ElementCompositionPreview ElementCompositionPreview ElementCompositionPreview ElementCompositionPreview Class

Definition

Enables access to composition visual objects that back XAML elements in the XAML composition tree.

public : sealed class ElementCompositionPreview
struct winrt::Windows::UI::Xaml::Hosting::ElementCompositionPreview
public sealed class ElementCompositionPreview
Public NotInheritable Class ElementCompositionPreview
Attributes

Windows 10 requirements

Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

ElementCompositionPreview allows access to the Windows.UI.Composition.Visual object backing a XAML element with the GetElementVisual method. Once the backing object has been retrieved it can be manipulated using the Windows.UI.Composition namespace. This allows properties of the object to be changed, like the orientation, or additional objects to be added to the XAML composition tree.

Version history

Windows version SDK version Value added
1703 15063 GetPointerPositionPropertySet
1703 15063 SetImplicitHideAnimation
1703 15063 SetImplicitShowAnimation
1703 15063 SetIsTranslationEnabled
1903 18362 GetAppWindowContent
1903 18362 SetAppWindowContent

Methods

GetAppWindowContent(AppWindow) GetAppWindowContent(AppWindow) GetAppWindowContent(AppWindow) GetAppWindowContent(AppWindow)

Retrieves the content root of an AppWindow.

GetElementChildVisual(UIElement) GetElementChildVisual(UIElement) GetElementChildVisual(UIElement) GetElementChildVisual(UIElement)

Retrieves a Windows.UI.Composition.Visual object previously set by a call to SetElementChildVisual.

GetElementVisual(UIElement) GetElementVisual(UIElement) GetElementVisual(UIElement) GetElementVisual(UIElement)

Retrieves the Windows.UI.Composition.Visual object that backs a XAML element in the XAML composition tree.

GetPointerPositionPropertySet(UIElement) GetPointerPositionPropertySet(UIElement) GetPointerPositionPropertySet(UIElement) GetPointerPositionPropertySet(UIElement)

Retrieves the pointer position relative to a UIElement.

GetScrollViewerManipulationPropertySet(ScrollViewer) GetScrollViewerManipulationPropertySet(ScrollViewer) GetScrollViewerManipulationPropertySet(ScrollViewer) GetScrollViewerManipulationPropertySet(ScrollViewer)

Retrieves the composition properties of a ScrollViewer element.

SetAppWindowContent(AppWindow, UIElement) SetAppWindowContent(AppWindow, UIElement) SetAppWindowContent(AppWindow, UIElement) SetAppWindowContent(AppWindow, UIElement)

Sets a XAML UIElement as the content root of an AppWindow.

SetElementChildVisual(UIElement, Visual) SetElementChildVisual(UIElement, Visual) SetElementChildVisual(UIElement, Visual) SetElementChildVisual(UIElement, Visual)

Sets a custom Windows.UI.Composition.Visual as the last child of the element’s visual tree.

SetImplicitHideAnimation(UIElement, ICompositionAnimationBase) SetImplicitHideAnimation(UIElement, ICompositionAnimationBase) SetImplicitHideAnimation(UIElement, ICompositionAnimationBase) SetImplicitHideAnimation(UIElement, ICompositionAnimationBase)

Associates the specified hide animation with a UIElement.

SetImplicitShowAnimation(UIElement, ICompositionAnimationBase) SetImplicitShowAnimation(UIElement, ICompositionAnimationBase) SetImplicitShowAnimation(UIElement, ICompositionAnimationBase) SetImplicitShowAnimation(UIElement, ICompositionAnimationBase)

Associates the specified show animation with a UIElement.

SetIsTranslationEnabled(UIElement, Boolean) SetIsTranslationEnabled(UIElement, Boolean) SetIsTranslationEnabled(UIElement, Boolean) SetIsTranslationEnabled(UIElement, Boolean)

Toggles the ability to set, animate, and use a render-time post-layout translate transform to position XAML elements on screen using Composition APIs.