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 : IXamlUIPresenterpublic sealed class XamlUIPresenter : IXamlUIPresenterPublic NotInheritable Class XamlUIPresenter Implements IXamlUIPresenter// This API is not available in Javascript.
- Attributes
| 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 Windows Store app that you submit to the Windows 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.
public : static PlatForm::Boolean CompleteTimelinesAutomatically { get; set; }public static bool CompleteTimelinesAutomatically { get; set; }Public Static ReadWrite Property CompleteTimelinesAutomatically As bool// This API is not available in Javascript.
- Value
- PlatForm::Boolean bool bool bool
true to always run timelines to end. Otherwise false.
RootElement RootElement RootElement RootElement
Gets or sets the root visual element to draw to the surface.
public : UIElement RootElement { get; set; }public UIElement RootElement { get; set; }Public ReadWrite Property RootElement As UIElement// This API is not available in Javascript.
ThemeKey ThemeKey ThemeKey ThemeKey
Gets or sets the string key that identifies the theme set to use from ThemeResourcesXaml.
public : PlatForm::String ThemeKey { get; set; }public string ThemeKey { get; set; }Public ReadWrite Property ThemeKey As string// This API is not available in Javascript.
- Value
- PlatForm::String string string string
A string key.
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.
public : PlatForm::String ThemeResourcesXaml { get; set; }public string ThemeResourcesXaml { get; set; }Public ReadWrite Property ThemeResourcesXaml As string// This API is not available in Javascript.
- Value
- PlatForm::String string string string
A XAML resource dictionary specified in string form.
Remarks
This property is expected to contain a string that can be parsed into a complete valid XAML resource dictionary, including all tagging, XAML namespaces specified, and so on.
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.
public : static Rect GetFlyoutPlacement(Rect placementTargetBounds, Size controlSize, Size minControlSize, Rect containerRect, FlyoutPlacementMode targetPreferredPlacement, bool allowFallbacks, FlyoutPlacementMode chosenPlacement)public static Rect GetFlyoutPlacement(Rect placementTargetBounds, Size controlSize, Size minControlSize, Rect containerRect, FlyoutPlacementMode targetPreferredPlacement, Boolean allowFallbacks, FlyoutPlacementMode chosenPlacement)Public Static Function GetFlyoutPlacement(placementTargetBounds As Rect, controlSize As Size, minControlSize As Size, containerRect As Rect, targetPreferredPlacement As FlyoutPlacementMode, allowFallbacks As Boolean, chosenPlacement As FlyoutPlacementMode) As Rect// This API is not available in Javascript.
The bounds of the placement target element, which are passed to FlyoutBase presenter logic.
The bounds of the area that should hold the placement target and flyout.
- targetPreferredPlacement
- FlyoutPlacementMode FlyoutPlacementMode FlyoutPlacementMode FlyoutPlacementMode
The desired placement mode to use for FlyoutBase placement logic.
- allowFallbacks
- bool Boolean Boolean Boolean
true if fallbacks can be used for the placement mode. false if fallbacks cannot be used.
- chosenPlacement
- FlyoutPlacementMode FlyoutPlacementMode FlyoutPlacementMode FlyoutPlacementMode
The actual placement mode used by the invoked FlyoutBase placement logic.
The bounds as calculated by FlyoutBase 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.
public : static Rect GetFlyoutPlacementTargetInfo(FrameworkElement placementTarget, FlyoutPlacementMode preferredPlacement, FlyoutPlacementMode targetPreferredPlacement, bool allowFallbacks)public static Rect GetFlyoutPlacementTargetInfo(FrameworkElement placementTarget, FlyoutPlacementMode preferredPlacement, FlyoutPlacementMode targetPreferredPlacement, Boolean allowFallbacks)Public Static Function GetFlyoutPlacementTargetInfo(placementTarget As FrameworkElement, preferredPlacement As FlyoutPlacementMode, targetPreferredPlacement As FlyoutPlacementMode, allowFallbacks As Boolean) As Rect// This API is not available in Javascript.
- placementTarget
- FrameworkElement FrameworkElement FrameworkElement FrameworkElement
The placement target element that the Flyout should be positioned in relation to.
- preferredPlacement
- FlyoutPlacementMode FlyoutPlacementMode FlyoutPlacementMode FlyoutPlacementMode
A value of the enumeration that declares the host's preferred placement of the Flyout relative to the target.
- targetPreferredPlacement
- FlyoutPlacementMode FlyoutPlacementMode FlyoutPlacementMode FlyoutPlacementMode
A value of the enumeration that declares preferred placement of the Flyout.
- allowFallbacks
- bool Boolean Boolean Boolean
true if fallback placements are permitted for the Flyout placement logic. false if only the targetPreferredPlacement value should be considered.
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.
public : static void NotifyWindowSizeChanged()public static void NotifyWindowSizeChanged()Public Static Function NotifyWindowSizeChanged() As void// This API is not available in Javascript.
Present() Present() Present() Present()
Presents the surface, as a synchronous call for the host.
public : void Present()public void Present()Public Function Present() As void// This API is not available in Javascript.
Render() Render() Render() Render()
Renders the surface. Intended for asynchronous calls via a timer.
public : void Render()public void Render()Public Function Render() As void// This API is not available in Javascript.
SetHost(IXamlUIPresenterHost) SetHost(IXamlUIPresenterHost) SetHost(IXamlUIPresenterHost) SetHost(IXamlUIPresenterHost)
Specifies the IXamlUIPresenterHost service implementation to use for application resource resolution.
public : static void SetHost(IXamlUIPresenterHost host)public static void SetHost(IXamlUIPresenterHost host)Public Static Function SetHost(host As IXamlUIPresenterHost) As void// This API is not available in Javascript.
A service implementation.
SetSize(Int32, Int32) SetSize(Int32, Int32) SetSize(Int32, Int32) SetSize(Int32, Int32)
Specifies the width and height of the surface.
public : void SetSize(int width, int height)public void SetSize(Int32 width, Int32 height)Public Function SetSize(width As Int32, height As Int32) As void// This API is not available in Javascript.
- width
- int Int32 Int32 Int32
A width in pixels.
- height
- int Int32 Int32 Int32
A height in pixels.