XamlUIPresenter XamlUIPresenter XamlUIPresenter XamlUIPresenter Class

Definition

Enables presenting a visual tree on a Microsoft Direct3D surface. This type is used for design tool hosting scenarios and is not intended for general use.

public : sealed class XamlUIPresenter : IXamlUIPresenter
struct winrt::Windows::UI::Xaml::Hosting::XamlUIPresenter : IXamlUIPresenter
public sealed class XamlUIPresenter : IXamlUIPresenter
Public NotInheritable Class XamlUIPresenter Implements IXamlUIPresenter
Attributes
Windows 10 requirements
Device family
Windows Desktop Extension SDK (introduced v10.0.10240.0)
API contract
Windows.UI.Xaml.Hosting.HostingContract (introduced v1)

Remarks

XamlUIPresenter is not intended for general Microsoft DirectX and Windows Runtime interoperation scenarios. You cannot use this API in a UWP app that you submit to the Microsoft Store, it will not pass certification.

For techniques for XAML-Microsoft DirectX interoperation functionality, instead see DirectX and XAML interop.

XamlUIPresenter is specifically intended for interoperation with designer surfaces that represent Windows Runtime objects or their XAML markup as graphical objects in a Microsoft DirectX UI.

XamlUIPresenter has no constructor in the Windows Runtime. To get an instance of XamlUIPresenter you must invoke a Component Object Model (COM) function (CreateXamlUIPresenter) as exported from a Windows Runtime DLL. For example, as part of a C# application you can import the Component Object Model (COM) library:

[DllImport("windows.ui.xaml.dll", SetLastError = true, CallingConvention = CallingConvention.Winapi)]
public static extern void CreateXamlUIPresenter(
    IViewObjectPresentNotifySite presentSite, out Windows.UI.Xaml.Hosting.XamlUIPresenter presenter
);

Properties

CompleteTimelinesAutomatically CompleteTimelinesAutomatically CompleteTimelinesAutomatically CompleteTimelinesAutomatically

Gets or sets a value that determines whether the host wants timelines to always run to end.

RootElement RootElement RootElement RootElement

Gets or sets the root visual element to draw to the surface.

ThemeKey ThemeKey ThemeKey ThemeKey

Gets or sets the string key that identifies the theme set to use from ThemeResourcesXaml.

ThemeResourcesXaml ThemeResourcesXaml ThemeResourcesXaml ThemeResourcesXaml

Gets or sets the XAML that specifies a resource dictionary. The resource dictionary contains themes that the host should resolve and that should be applied to the content.

Methods

GetFlyoutPlacement(Rect, Size, Size, Rect, FlyoutPlacementMode, Boolean, FlyoutPlacementMode) GetFlyoutPlacement(Rect, Size, Size, Rect, FlyoutPlacementMode, Boolean, FlyoutPlacementMode) GetFlyoutPlacement(Rect, Size, Size, Rect, FlyoutPlacementMode, Boolean, FlyoutPlacementMode) GetFlyoutPlacement(Rect, Size, Size, Rect, FlyoutPlacementMode, Boolean, FlyoutPlacementMode)

Invokes the FlyoutBase placement logic, using a suggested size of a control that will show a placement target and its flyout. Returns the bounds that are the result of running the placement logic.

GetFlyoutPlacementTargetInfo(FrameworkElement, FlyoutPlacementMode, FlyoutPlacementMode, Boolean) GetFlyoutPlacementTargetInfo(FrameworkElement, FlyoutPlacementMode, FlyoutPlacementMode, Boolean) GetFlyoutPlacementTargetInfo(FrameworkElement, FlyoutPlacementMode, FlyoutPlacementMode, Boolean) GetFlyoutPlacementTargetInfo(FrameworkElement, FlyoutPlacementMode, FlyoutPlacementMode, Boolean)

Returns calculated bounds of a placement target that is intended to also display a flyout in the host. Additional out parameters provide more info on how the bounds were calculated.

NotifyWindowSizeChanged() NotifyWindowSizeChanged() NotifyWindowSizeChanged() NotifyWindowSizeChanged()

Invokes the SizeChanged event on Window.Current. Used by hosts to propagate size changes from host settings to user code, so that a design mode interaction can be differentiated from a run time interaction.

Present() Present() Present() Present()

Presents the surface, as a synchronous call for the host.

Render() Render() Render() Render()

Renders the surface. Intended for asynchronous calls via a timer.

SetHost(IXamlUIPresenterHost) SetHost(IXamlUIPresenterHost) SetHost(IXamlUIPresenterHost) SetHost(IXamlUIPresenterHost)

Specifies the IXamlUIPresenterHost service implementation to use for application resource resolution.

SetSize(Int32, Int32) SetSize(Int32, Int32) SetSize(Int32, Int32) SetSize(Int32, Int32)

Specifies the width and height of the surface.