IXamlDirect Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents the base class for all XamlDirect APIs. All of the XamlDirect APIs are instance methods of this class.
XamlDirect is an API for accessing Xaml at a more primitive level for better CPU and working set performance.
This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).
public interface class IXamlDirect
/// [Windows.Foundation.Metadata.Guid(4033394725, 47688, 15249, 168, 125, 175, 177, 215, 54, 10, 43)]
/// [Windows.Foundation.Metadata.Version(1)]
struct IXamlDirect
[Windows.Foundation.Metadata.Guid(4033394725, 47688, 15249, 168, 125, 175, 177, 215, 54, 10, 43)]
[Windows.Foundation.Metadata.Version(1)]
public interface IXamlDirect
Public Interface IXamlDirect
- Attributes
Examples
Tip
The WinUI 3 Gallery and WinUI 2 Gallery apps include interactive examples of most WinUI 3 and WinUI 2 controls, features, and functionality.
If installed already, open them by clicking the following links: WinUI 3 Gallery or WinUI 2 Gallery.
If they are not installed, you can download the WinUI 3 Gallery and the WinUI 2 Gallery from the Microsoft Store.
You can also get the source code for both from GitHub (use the main branch for WinUI 3 and the winui2 branch for WinUI 2).
Properties
IsXamlDirectEnabled |
Gets whether XamlDirect can be instantiated. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
Methods
AddEventHandler(Object, XamlEventIndex, Object, Boolean) |
Adds the specified event handler for a specified event using XamlEventIndex, adding the handler to the handler collection on the current IXamlDirect. Specify handledEventsToo as true to have the provided handler be invoked even if the event is handled elsewhere. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
AddEventHandler(Object, XamlEventIndex, Object) |
Adds the specified event handler for a specified event using XamlEventIndex, adding the handler to the handler collection on the specified object. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
AddToCollection(Object, Object) |
Adds a value to the specified IXamlDirect collection. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
ClearCollection(Object) |
Removes all items from the specified IXamlDirect collection. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
ClearProperty(Object, XamlPropertyIndex) |
Clears the value of the specified property on a given IXamlDirect. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
CreateInstance(XamlTypeIndex) |
Creates an IXamlDirect instance of the type specified by the XamlTypeIndex parameter. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
GetBooleanProperty(Object, XamlPropertyIndex) |
Gets the value of a Boolean property for a specific IXamlDirect. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
GetCollectionCount(Object) |
Returns the count of items in the specified IXamlDirect collection. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
GetColorProperty(Object, XamlPropertyIndex) |
Gets the value of a Color property for a specific IXamlDirect. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
GetCornerRadiusProperty(Object, XamlPropertyIndex) |
Gets the value of a CornerRadius property for a specific IXamlDirect. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
GetDateTimeProperty(Object, XamlPropertyIndex) |
Gets the value of a DateTimeOffset property for a specific IXamlDirect. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
GetDoubleProperty(Object, XamlPropertyIndex) |
Gets the value of a Double property for a specific IXamlDirect. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
GetDurationProperty(Object, XamlPropertyIndex) |
Gets the value of a Duration property for a specific IXamlDirect. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
GetEnumProperty(Object, XamlPropertyIndex) |
Gets the value of an Enum property for a specific IXamlDirect. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
GetGridLengthProperty(Object, XamlPropertyIndex) |
Gets the value of a GridLength property for a specific IXamlDirect. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
GetInt32Property(Object, XamlPropertyIndex) |
Gets the value of an Int32 property for a specific IXamlDirect. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
GetMatrix3DProperty(Object, XamlPropertyIndex) |
Gets the value of a Matrix3D property for a specific IXamlDirect. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
GetMatrixProperty(Object, XamlPropertyIndex) |
Gets the value of a Matrix property for a specific IXamlDirect. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
GetObject(Object) |
Gets (and creates if necessary) the instance as its full XAML type of the specified IXamlDirect. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
GetObjectProperty(Object, XamlPropertyIndex) |
Gets the value of an object property for a specific IXamlDirect. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
GetPointProperty(Object, XamlPropertyIndex) |
Gets the value of a Point property for a specific IXamlDirect. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
GetRectProperty(Object, XamlPropertyIndex) |
Gets the value of a Rect property for a specific IXamlDirect. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
GetSizeProperty(Object, XamlPropertyIndex) |
Gets the value of a Size property for a specific IXamlDirect. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
GetStringProperty(Object, XamlPropertyIndex) |
Gets the value of a string property for a specific IXamlDirect. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
GetThicknessProperty(Object, XamlPropertyIndex) |
Gets the value of a Thickness property for a specific IXamlDirect. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
GetTimeSpanProperty(Object, XamlPropertyIndex) |
Gets the value of a TimeSpan property for a specific IXamlDirect. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
GetXamlDirectObject(Object) |
Gets the instance as an IXamlDirect for a given XAML type. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
GetXamlDirectObjectFromCollectionAt(Object, UInt32) |
Returns the IXamlDirect item at the specified index from the specified IXamlDirect collection. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
GetXamlDirectObjectProperty(Object, XamlPropertyIndex) |
Gets the value of an IXamlDirect property for a specific IXamlDirect. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
InsertIntoCollectionAt(Object, UInt32, Object) |
Inserts a value into the specified IXamlDirect collection at the specified index. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
RemoveEventHandler(Object, XamlEventIndex, Object) |
Removes the specified event handler from this IXamlDirect. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
RemoveFromCollection(Object, Object) |
Tries to remove a value from the specified IXamlDirect collection. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
RemoveFromCollectionAt(Object, UInt32) |
Attempts to remove a value from the IXamlDirect collection at the specified index. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
SetBooleanProperty(Object, XamlPropertyIndex, Boolean) |
Sets the value of a Boolean property for a specific IXamlDirect. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
SetColorProperty(Object, XamlPropertyIndex, Color) |
Sets the value of a Color property for a specific IXamlDirect. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
SetCornerRadiusProperty(Object, XamlPropertyIndex, CornerRadius) |
Sets the value of a CornerRadius property for a specific IXamlDirect. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
SetDateTimeProperty(Object, XamlPropertyIndex, DateTime) |
Sets the value of a DateTimeOffset property for a specific IXamlDirect. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
SetDoubleProperty(Object, XamlPropertyIndex, Double) |
Sets the value of a Double property for a specific IXamlDirect. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
SetDurationProperty(Object, XamlPropertyIndex, Duration) |
Sets the value of a Duration property for a specific IXamlDirect. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
SetEnumProperty(Object, XamlPropertyIndex, UInt32) |
Sets the value of an Enum property for a specific IXamlDirect. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
SetGridLengthProperty(Object, XamlPropertyIndex, GridLength) |
Sets the value of a GridLength property for a specific IXamlDirect. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
SetInt32Property(Object, XamlPropertyIndex, Int32) |
Sets the value of an Int32 property for a specific IXamlDirect. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
SetMatrix3DProperty(Object, XamlPropertyIndex, Matrix3D) |
Sets the value of a Matrix3D property for a specific IXamlDirect. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
SetMatrixProperty(Object, XamlPropertyIndex, Matrix) |
Sets the value of a Matrix property for a specific IXamlDirect. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
SetObjectProperty(Object, XamlPropertyIndex, Object) |
Sets the value of an object property for a specific IXamlDirect. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
SetPointProperty(Object, XamlPropertyIndex, Point) |
Sets the value of a Point property for a specific IXamlDirect. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
SetRectProperty(Object, XamlPropertyIndex, Rect) |
Sets the value of a Rect property for a specific IXamlDirect. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
SetSizeProperty(Object, XamlPropertyIndex, Size) |
Sets the value of a Size property for a specific IXamlDirect. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
SetStringProperty(Object, XamlPropertyIndex, String) |
Sets the value of a string property for a specific IXamlDirect. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
SetThicknessProperty(Object, XamlPropertyIndex, Thickness) |
Sets the value of a Thickness property for a specific IXamlDirect. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
SetTimeSpanProperty(Object, XamlPropertyIndex, TimeSpan) |
Sets the value of a TimeSpan property for a specific IXamlDirect. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |
SetXamlDirectObjectProperty(Object, XamlPropertyIndex, Object) |
Sets the value of an IXamlDirect property for a specific IXamlDirect. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces). |