Questions tagged [windows-composition-api]

For questions about the Windows.UI.Compositon WinRT API namespace which can be called from any Universal Windows Platform app to create lightweight visuals and apply powerful animations, effects, and manipulations in an application.

40 questions
1
vote
1 answer

UWP PointLight darkens background

I'm trying to animate over an SVG image using PointLight. However, I'm facing an issue where the image is getting darkened with a black overlay when used in light mode (i.e., with a white background). According to the API documentation, only the…
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

UWP - How to create a CompositionSurfaceBrush with a repeated pattern

I would like to have a Panel with a Background that shows a repeated pattern (e.g. dots, evenly separated of 30 pixels). So far, I managed to create a subclass of XamlCompositionBrushBase that allows we to create my own shape (e.g. a single dot).…
Cristiano Ghersi
  • 1,944
  • 1
  • 20
  • 46
1
vote
2 answers

Offset values for Windows Composition Visual not getting correctly initialized

I am using UWP and working with the Composition API to programmatically slide items around on the screen and I have found that when the application first starts that the initial slide for many of the elements are not performing correctly. Upon…
HoloSheep
  • 53
  • 12
1
vote
0 answers

Is it possible to control Composition XAML ElementVisual Clipping?

I am using UWP and working with the Composition API to programmatically scale child text visuals that are nested in a typical XAML hierarchy. The textblocks in our app are contained in things like borders and a number of those borders are items…
HoloSheep
  • 53
  • 12
1
vote
1 answer

How to make backside of Windows Composition UI ElementVisual different from front when rotated?

I have a uwp xaml application with series of buttons in the UI. I am using the Windows Composition Visual Layer APIs to animate the RotationAngleInDegrees of one of the Button's visuals. The content of the button is visible on the front side which I…
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
0 answers

Cannot create Drop Shadow from Image created by Screen shot (capture)

My code can make DropShadow for TextBlock but cannot create it for image if I create image from screen shot. Using normal image (Image source has been set already) problem do not occur. I believe that problem must be in image format (somehow) I get…
Weissu
  • 409
  • 3
  • 15
1
vote
1 answer

UWP wincomposition: animate multiple images' offset

I try to animate multiple (different sized) images in one Grid control but only the biggest one is animated. The targeted property is "Offset.x". var container = new Grid(); var compositor =…
1
vote
1 answer

UWP collapsible page header

I'm trying to implement the collapsible page header. The main idea is I have to change the height of page header (min height 60 and max is 160) depending on the changes in the scrollviewer. Here is the result I want to achieve. Initial state of the…
1
vote
1 answer

Getting Access is denied exception when calling CompositionCapabilities.GetForCurrentView

I am getting the following exception when I call CompositionCapabilities.GetForCurrentView. System.UnauthorizedAccessException: 'Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))' public App() { …
Jessica
  • 2,057
  • 1
  • 15
  • 24
0
votes
0 answers

Acrylic blur on sprite

I tweaked the code in this documentation to have a blur on the sprites generated by it. By using Effect brushes as per this example and also guidance from this post. However, the sprite remains unaffected whatsoever and doesn't blur at all. Here is…
0
votes
1 answer

UWP CompositionRadialGradientBrush throws cast error on HoloLens

After releasing a UWP application to the Windows Store that runs well on both desktop and Xbox, I noticed that it was not launching successfully when installed as a 2D application on a HoloLens. Hooking it up to a debugger I discovered the following…
0
votes
0 answers

Using complex paths for CompositionClip

Visuals in UWP/WinUI can have a Clip applied to them which is an instance of a CompositionClip. One of the types of CompositionClip is a GeometricClip which can have a Geometry of various types derived from the CompositionGeometry class. I'm seeking…
Zoso
  • 3,273
  • 1
  • 16
  • 27