XamlUIService
Kind: class
Provides access to XAML UI-specific functionality. It provides access to APIs to get a XAML element from a react tag, and to dispatch events to JS components.
Methods
DispatchEvent
void DispatchEvent
(FrameworkElement
view, string eventName, JSValueArgWriter
eventDataArgWriter)
Dispatches an event to a JS component.
ElementFromReactTag
DependencyObject
ElementFromReactTag
(int64_t reactTag)
Gets the backing XAML element from a react tag.
FromContext
static
XamlUIService
FromContext
(IReactContext
context)
Use this method to get access to the XamlUIService
associated with the IReactContext
.
GetXamlRoot
static
XamlRoot
GetXamlRoot
(IReactPropertyBag
properties)
Retrieves the default XamlRoot
for the app.
SetXamlRoot
static
void SetXamlRoot
(IReactPropertyBag
properties, XamlRoot
xamlRoot)
Sets the XamlRoot
element for the app. This must be manually provided to the ReactInstanceSettings
object when using XAML Islands so that certain APIs work correctly.
For more information, see Host WinRT XAML Controls in desktop apps (XAML Islands).