Lezen in het Engels

Share via


SwapChainPanel.CompositionScaleChanged Event

Definition

Occurs when the composition scale factor of the SwapChainPanel has changed.

public event TypedEventHandler<SwapChainPanel,object> CompositionScaleChanged;
<SwapChainPanel CompositionScaleChanged="eventhandler"/>

Event Type

Remarks

The supplier of the swap chain content might need to resize their content if a layout pass determines a new size for the panel or containers it's within, or if a RenderTransform is applied on the SwapChainPanel or any of its ancestors. Changes of this nature aren't always originated by app logic that's easy to detect from other events (for example the user might change a device orientation or a view state that causes layout to rerun), so this event provides a notification specifically for the scenario of changing the swap chain content size, which would typically invert the scale factors applied.

Check CompositionScaleX and CompositionScaleY any time you are handling CompositionScaleChanged (CompositionScaleChanged doesn't have event data, but if it fires it means that one or both properties have changed values on this SwapChainPanel).

This event fires asynchronously versus the originating change. For example, dynamic animations or manipulations might affect the scale factor, and the event is raised when those dynamic changes are completed.

Applies to

Product Versies
WinRT Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100