Jaa


XamlDirect Class

Definition

Represents the base class for all XamlDirect APIs. All of the XamlDirect APIs are instance methods off of this class.

XamlDirect is an API for accessing Xaml at a more primitive level for better CPU and working set performance.

Equivalent WinUI 2 API for UWP: Microsoft.UI.Xaml.Core.Direct.XamlDirect (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

public ref class XamlDirect sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.UI.Xaml.Core.Direct.XamlDirectContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class XamlDirect final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.UI.Xaml.Core.Direct.XamlDirectContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class XamlDirect
Public NotInheritable Class XamlDirect
Inheritance
Object Platform::Object IInspectable XamlDirect
Attributes

Windows requirements

Device family
Windows 10, version 1809 (introduced in 10.0.17763.0)
API contract
Windows.UI.Xaml.Core.Direct.XamlDirectContract (introduced in v1.0)

Methods

AddEventHandler(IXamlDirectObject, XamlEventIndex, Object, Boolean)

Adds the specified event handler for a specified event using XamlEventIndex, adding the handler to the handler collection on the current IXamlDirectObject. Specify handledEventsToo as true to have the provided handler be invoked even if the event is handled elsewhere.

AddEventHandler(IXamlDirectObject, XamlEventIndex, Object)

Adds the specified event handler for a specified event using XamlEventIndex, adding the handler to the handler collection on the current IXamlDirectObject.

AddToCollection(IXamlDirectObject, IXamlDirectObject)

Adds a value to the specified IXamlDirectObject collection.

ClearCollection(IXamlDirectObject)

Removes all items from the specified IXamlDirectObject collection.

ClearProperty(IXamlDirectObject, XamlPropertyIndex)

Clears the value of the specified property on a given IXamlDirectObject.

CreateInstance(XamlTypeIndex)

Creates an IXamlDirectObject instance of the type specified by the XamlTypeIndex parameter.

GetBooleanProperty(IXamlDirectObject, XamlPropertyIndex)

Gets the value of a Boolean property for a specific IXamlDirectObject.

GetCollectionCount(IXamlDirectObject)

Returns the count of items in the specified IXamlDirectObject collection.

GetColorProperty(IXamlDirectObject, XamlPropertyIndex)

Gets the value of a Color property for a specific IXamlDirectObject.

GetCornerRadiusProperty(IXamlDirectObject, XamlPropertyIndex)

Gets the value of a CornerRadius property for a specific IXamlDirectObject.

GetDateTimeProperty(IXamlDirectObject, XamlPropertyIndex)

Gets the value of a DateTimeOffset property for a specific IXamlDirectObject.

GetDefault()

Returns the current XamlDirect instance.

Equivalent WinUI 2 API for UWP: Microsoft.UI.Xaml.Core.Direct.XamlDirect.GetDefault (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

GetDoubleProperty(IXamlDirectObject, XamlPropertyIndex)

Gets the value of a Double property for a specific IXamlDirectObject.

GetDurationProperty(IXamlDirectObject, XamlPropertyIndex)

Gets the value of a Duration property for a specific IXamlDirectObject.

GetEnumProperty(IXamlDirectObject, XamlPropertyIndex)

Gets the value of an Enum property for a specific IXamlDirectObject.

GetGridLengthProperty(IXamlDirectObject, XamlPropertyIndex)

Gets the value of a GridLength property for a specific IXamlDirectObject.

GetInt32Property(IXamlDirectObject, XamlPropertyIndex)

Gets the value of an Int32 property for a specific IXamlDirectObject.

GetMatrix3DProperty(IXamlDirectObject, XamlPropertyIndex)

Gets the value of a Matrix3D property for a specific IXamlDirectObject.

GetMatrixProperty(IXamlDirectObject, XamlPropertyIndex)

Gets the value of a Matrix property for a specific IXamlDirectObject.

GetObject(IXamlDirectObject)

Gets (and creates if necessary) the instance as its full XAML type of the specified IXamlDirectObject.

GetObjectProperty(IXamlDirectObject, XamlPropertyIndex)

Gets the value of an object property for a specific IXamlDirectObject.

GetPointProperty(IXamlDirectObject, XamlPropertyIndex)

Gets the value of a Point property for a specific IXamlDirectObject.

GetRectProperty(IXamlDirectObject, XamlPropertyIndex)

Gets the value of a Rect property for a specific IXamlDirectObject.

GetSizeProperty(IXamlDirectObject, XamlPropertyIndex)

Gets the value of a Size property for a specific IXamlDirectObject.

GetStringProperty(IXamlDirectObject, XamlPropertyIndex)

Gets the value of a string property for a specific IXamlDirectObject.

GetThicknessProperty(IXamlDirectObject, XamlPropertyIndex)

Gets the value of a Thickness property for a specific IXamlDirectObject.

GetTimeSpanProperty(IXamlDirectObject, XamlPropertyIndex)

Gets the value of a TimeSpan property for a specific IXamlDirectObject.

GetXamlDirectObject(Object)

Gets the instance as an IXamlDirectObject for a given XAML type.

GetXamlDirectObjectFromCollectionAt(IXamlDirectObject, UInt32)

Returns the IXamlDirectObject item at the specified index from the specified IXamlDirectObject collection.

GetXamlDirectObjectProperty(IXamlDirectObject, XamlPropertyIndex)

Gets the value of an IXamlDirectObject property for a specific IXamlDirectObject.

InsertIntoCollectionAt(IXamlDirectObject, UInt32, IXamlDirectObject)

Inserts a value into the specified IXamlDirectObject collection at the specified index.

RemoveEventHandler(IXamlDirectObject, XamlEventIndex, Object)

Removes the specified event handler from this IXamlDirectObject. Typically, the handler in question was added by XamlDirect.AddEventHandler.

RemoveFromCollection(IXamlDirectObject, IXamlDirectObject)

Tries to remove a value from the specified IXamlDirectObject collection.

RemoveFromCollectionAt(IXamlDirectObject, UInt32)

Tries to remove a value from the IXamlDirectObject collection at the specified index.

SetBooleanProperty(IXamlDirectObject, XamlPropertyIndex, Boolean)

Sets the value of a Boolean property for a specific IXamlDirectObject.

SetColorProperty(IXamlDirectObject, XamlPropertyIndex, Color)

Sets the value of a Color property for a specific IXamlDirectObject.

SetCornerRadiusProperty(IXamlDirectObject, XamlPropertyIndex, CornerRadius)

Sets the value of a CornerRadius property for a specific IXamlDirectObject.

SetDateTimeProperty(IXamlDirectObject, XamlPropertyIndex, DateTime)

Sets the value of a DateTimeOffset property for a specific IXamlDirectObject.

SetDoubleProperty(IXamlDirectObject, XamlPropertyIndex, Double)

Sets the value of a Double property for a specific IXamlDirectObject.

SetDurationProperty(IXamlDirectObject, XamlPropertyIndex, Duration)

Sets the value of a Duration property for a specific IXamlDirectObject.

SetEnumProperty(IXamlDirectObject, XamlPropertyIndex, UInt32)

Sets the value of an Enum property for a specific IXamlDirectObject.

SetGridLengthProperty(IXamlDirectObject, XamlPropertyIndex, GridLength)

Sets the value of a GridLength property for a specific IXamlDirectObject.

SetInt32Property(IXamlDirectObject, XamlPropertyIndex, Int32)

Sets the value of an Int32 property for a specific IXamlDirectObject.

SetMatrix3DProperty(IXamlDirectObject, XamlPropertyIndex, Matrix3D)

Sets the value of a Matrix3D property for a specific IXamlDirectObject.

SetMatrixProperty(IXamlDirectObject, XamlPropertyIndex, Matrix)

Sets the value of a Matrix property for a specific IXamlDirectObject.

SetObjectProperty(IXamlDirectObject, XamlPropertyIndex, Object)

Sets the value of an object property for a specific IXamlDirectObject.

SetPointProperty(IXamlDirectObject, XamlPropertyIndex, Point)

Sets the value of a Point property for a specific IXamlDirectObject.

SetRectProperty(IXamlDirectObject, XamlPropertyIndex, Rect)

Sets the value of a Rect property for a specific IXamlDirectObject.

SetSizeProperty(IXamlDirectObject, XamlPropertyIndex, Size)

Sets the value of a Size property for a specific IXamlDirectObject.

SetStringProperty(IXamlDirectObject, XamlPropertyIndex, String)

Sets the value of a string property for a specific IXamlDirectObject.

SetThicknessProperty(IXamlDirectObject, XamlPropertyIndex, Thickness)

Sets the value of a Thickness property for a specific IXamlDirectObject.

SetTimeSpanProperty(IXamlDirectObject, XamlPropertyIndex, TimeSpan)

Sets the value of a TimeSpan property for a specific IXamlDirectObject.

SetXamlDirectObjectProperty(IXamlDirectObject, XamlPropertyIndex, IXamlDirectObject)

Sets the value of an IXamlDirectObject property for a specific IXamlDirectObject.

Applies to

See also