Questions tagged [xaml-composition]

14 questions
13
votes
2 answers

how to apply mask to CompositionBrush

How do I apply alpha mask, or clipping mask, so everything except the rectangle will be…
Liero
  • 25,216
  • 29
  • 151
  • 297
11
votes
1 answer

Does UWP Composition Api support color replacement?

I've been trying to look for an examples which related to Color Replacement, here's an example using the Photoshop which can take, for example, a Blue shade and replace it with a Red shade: BEFORE: AFTER: Is this possible using the Composition…
Maximus
  • 1,441
  • 14
  • 38
3
votes
2 answers

I can't get my Projection Matrix to have a proper perspective for a Rotation animation

Im trying to replicate a plane projection rotation in UWP using the composition api. But I'm having trouble with a projection matrix in my composition code. Heres what I have: private void Perspective(FrameworkElement element, double duration, float…
Maximus
  • 1,441
  • 14
  • 38
3
votes
1 answer

How to retrieve Parent Visual Size within XamlCompositionBrushBase?

I'm creating a class inheriting from XamlCompositionBrushBase and want to know the render size of the visual the brush is attached to when it's hooked up in OnConnected. I need this info to create a surface in my composition that's the size of my…
1
vote
1 answer

How can I retrieve a CompositionEffect given a FrameworkElement?

I'm experimenting with a chained effect and set it on an Image control (TestImage) as such: private void TestImage_ImageOpened(object sender, RoutedEventArgs e) { /* (input) Backdrop -> GaussianBlur -> | …
Maximus
  • 1,441
  • 14
  • 38
1
vote
1 answer

Why isn't the Translation property (Composition) retained?

I have the following code which translates the rectangle down 100px, then once completed translates the rectangle right 100px, BUT I would like the rightwards translation to maintain the animated Y (100px), however it doesn't do that. When I debug,…
Maximus
  • 1,441
  • 14
  • 38
1
vote
1 answer

Weird Opacity animation behavior after adding Composition Light effect

So I'm currently using Windows composition Apis to create a "fade-in" animation, combining a scale animation and an opacity animation, to my custom control, which worked perfectly fine. However, recently I tried to add some light effect but for some…
jason_wun
  • 113
  • 1
  • 12
1
vote
2 answers

UWP Composition API breaks Visual Studio 2015 Designer - Cannot load a reference assembly for execution

When I create custom control that uses new Composition API from Anniversary Update, then Visual Studio Designer is broken: However the application runs just fine. Why is that? how to avoid it? EDIT: Please, vote on UserVoice (Fix the UWP designer…
Liero
  • 25,216
  • 29
  • 151
  • 297
0
votes
2 answers

Composition - Why does my element immediately set a Blur on my animation?

I have the following Xaml for my sample app to demonstrate the issue:
Maximus
  • 1,441
  • 14
  • 38
0
votes
2 answers

How to set a property without using an animation (Composition Api)?

Question, how can we set a value for a property on Visual without using an animation? For example this works for me (for a Translation) but I feel there must be a better way. I'm using an animation of 1 millisecond to set a value…
Maximus
  • 1,441
  • 14
  • 38
0
votes
2 answers

How can a ListViewBase animation be improved?

I'm creating a composition-based animation which I would like to scale-in each ListViewItem as they are loaded. I have the following sample code: public sealed partial class MainPage : Page { public MainPage() { …
0
votes
1 answer

Unable to retrieve the missing variables for a Composition animation

I'm trying to apply a pointer animation using the Composition Api along with the Expression Builder. I've found a sample of what I need, but the code is imcomplete and I cannot figure out how to get the values for the variables center and…
0
votes
1 answer

Make UIElement visible only under SpotLight

I have an rectangle: And a Windows.UI.Composition.SpotLight moving togehter with pointer: const float LightDistance = 20; _compositor =…
Liero
  • 25,216
  • 29
  • 151
  • 297
0
votes
1 answer

Remove SpriteVisual previously set by ElementCompositionPreview.SetElementChildVisual

_compositor = ElementCompositionPreview.GetElementVisual(this).Compositor; _blurSprite = _compositor.CreateSpriteVisual(); ElementCompositionPreview.SetElementChildVisual(MainPage.Instance.ContentRoot, _blurSprite); How do I remove _blurSprite that…
Liero
  • 25,216
  • 29
  • 151
  • 297