SwapChainPanel.CompositionScaleChanged event

Applies to Windows and Windows Phone

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

Syntax


public:
event TypedEventHandler<SwapChainPanel, Object>^ CompositionScaleChanged {
   Windows::Foundation::EventRegistrationToken add(TypedEventHandler<SwapChainPanel, Object>^ value);
   void remove(Windows::Foundation::EventRegistrationToken token);
}


<SwapChainPanel CompositionScaleChanged="eventhandler"/>

Event information

Delegate TypedEventHandler<SwapChainPanel, Object>

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.

Requirements

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Controls
Windows::UI::Xaml::Controls [C++]

Metadata

Windows.winmd

See also

SwapChainPanel

 

 

Show:
© 2014 Microsoft