XamlDirect 類別

定義

表示所有 XamlDirect API 的基類。 所有 XamlDirect API 都是這個類別的實例方法。

XamlDirect 是一種 API,可在更基本層級存取 Xaml,以取得更佳的 CPU 和工作集效能。

適用于 UWP 的對等 WinUI 2 API:Windows 應用程式 SDK中適用于 WinUIMicrosoft.UI.Xaml.Core.Direct.XamlDirect (,請參閱Windows 應用程式 SDK命名空間) 。

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
繼承
Object Platform::Object IInspectable XamlDirect
屬性

Windows 需求

裝置系列
Windows 10, version 1809 (已於 10.0.17763.0 引進)
API contract
Windows.UI.Xaml.Core.Direct.XamlDirectContract (已於 v1.0 引進)

方法

AddEventHandler(IXamlDirectObject, XamlEventIndex, Object)

使用 XamlEventIndex為指定的事件新增指定的事件處理常式,並將處理常式新增至目前 IXamlDirectObject上的處理常式集合。

AddEventHandler(IXamlDirectObject, XamlEventIndex, Object, Boolean)

使用 XamlEventIndex為指定的事件新增指定的事件處理常式,並將處理常式新增至目前 IXamlDirectObject上的處理常式集合。 將 handledEventsToo 指定為 true,以叫用提供的處理常式,即使事件是在其他地方處理也一樣。

AddToCollection(IXamlDirectObject, IXamlDirectObject)

將值加入至指定的 IXamlDirectObject 集合。

ClearCollection(IXamlDirectObject)

從指定的 IXamlDirectObject 集合中移除所有專案。

ClearProperty(IXamlDirectObject, XamlPropertyIndex)

清除指定 IXamlDirectObject上指定屬性的值。

CreateInstance(XamlTypeIndex)

建立XamlTypeIndex參數所指定類型的IXamlDirectObject實例。

GetBooleanProperty(IXamlDirectObject, XamlPropertyIndex)

取得特定IXamlDirectObjectBoolean屬性值。

GetCollectionCount(IXamlDirectObject)

會傳回指定 之 IXamlDirectObject 集合中的專案計數。

GetColorProperty(IXamlDirectObject, XamlPropertyIndex)

取得特定IXamlDirectObjectColor屬性值。

GetCornerRadiusProperty(IXamlDirectObject, XamlPropertyIndex)

取得特定IXamlDirectObjectCornerRadius屬性值。

GetDateTimeProperty(IXamlDirectObject, XamlPropertyIndex)

取得特定IXamlDirectObjectDateTimeOffset屬性值。

GetDefault()

傳回目前的 XamlDirect 實例。

適用于 UWP 的對等 WinUI 2 APIMicrosoft.UI.Xaml.Core.Direct.XamlDirect.GetDefault (Windows 應用程式 SDK中的 WinUI,請參閱Windows 應用程式 SDK命名空間) 。

GetDoubleProperty(IXamlDirectObject, XamlPropertyIndex)

取得特定IXamlDirectObjectDouble屬性值。

GetDurationProperty(IXamlDirectObject, XamlPropertyIndex)

取得特定IXamlDirectObjectDuration屬性值。

GetEnumProperty(IXamlDirectObject, XamlPropertyIndex)

取得特定IXamlDirectObjectEnum屬性值。

GetGridLengthProperty(IXamlDirectObject, XamlPropertyIndex)

取得特定IXamlDirectObjectGridLength屬性值。

GetInt32Property(IXamlDirectObject, XamlPropertyIndex)

取得特定IXamlDirectObjectInt32屬性值。

GetMatrix3DProperty(IXamlDirectObject, XamlPropertyIndex)

取得特定IXamlDirectObjectMatrix3D屬性值。

GetMatrixProperty(IXamlDirectObject, XamlPropertyIndex)

取得特定IXamlDirectObjectMatrix屬性值。

GetObject(IXamlDirectObject)

取得 (,並視需要) 實例作為指定 IXamlDirectObject的完整 XAML 類型建立。

GetObjectProperty(IXamlDirectObject, XamlPropertyIndex)

取得特定IXamlDirectObject的物件屬性值。

GetPointProperty(IXamlDirectObject, XamlPropertyIndex)

取得特定IXamlDirectObjectPoint屬性值。

GetRectProperty(IXamlDirectObject, XamlPropertyIndex)

取得特定IXamlDirectObjectRect屬性值。

GetSizeProperty(IXamlDirectObject, XamlPropertyIndex)

取得特定IXamlDirectObject的 Size屬性值。

GetStringProperty(IXamlDirectObject, XamlPropertyIndex)

取得特定IXamlDirectObject字串屬性值。

GetThicknessProperty(IXamlDirectObject, XamlPropertyIndex)

取得特定IXamlDirectObjectThickness屬性值。

GetTimeSpanProperty(IXamlDirectObject, XamlPropertyIndex)

取得特定IXamlDirectObject的 TimeSpan屬性值。

GetXamlDirectObject(Object)

取得指定 XAML 類型的 IXamlDirectObject 實例。

GetXamlDirectObjectFromCollectionAt(IXamlDirectObject, UInt32)

從指定的 IXamlDirectObject 集合傳回位於指定索引處的 IXamlDirectObject 專案。

GetXamlDirectObjectProperty(IXamlDirectObject, XamlPropertyIndex)

取得特定 IXamlDirectObjectIXamlDirectObject屬性值。

InsertIntoCollectionAt(IXamlDirectObject, UInt32, IXamlDirectObject)

將值插入指定的 IXamlDirectObject 集合中指定的索引處。

RemoveEventHandler(IXamlDirectObject, XamlEventIndex, Object)

從這個 IXamlDirectObject中移除指定的事件處理常式。 一般而言,有問題的處理常式是由 XamlDirect.AddEventHandler所新增。

RemoveFromCollection(IXamlDirectObject, IXamlDirectObject)

嘗試從指定的 IXamlDirectObject 集合中移除值。

RemoveFromCollectionAt(IXamlDirectObject, UInt32)

嘗試從指定索引處的 IXamlDirectObject 集合中移除值。

SetBooleanProperty(IXamlDirectObject, XamlPropertyIndex, Boolean)

設定特定IXamlDirectObjectBoolean屬性值。

SetColorProperty(IXamlDirectObject, XamlPropertyIndex, Color)

設定特定IXamlDirectObjectColor屬性值。

SetCornerRadiusProperty(IXamlDirectObject, XamlPropertyIndex, CornerRadius)

設定特定IXamlDirectObjectCornerRadius屬性值。

SetDateTimeProperty(IXamlDirectObject, XamlPropertyIndex, DateTime)

設定特定IXamlDirectObjectDateTimeOffset屬性值。

SetDoubleProperty(IXamlDirectObject, XamlPropertyIndex, Double)

設定特定IXamlDirectObjectDouble屬性值。

SetDurationProperty(IXamlDirectObject, XamlPropertyIndex, Duration)

設定特定IXamlDirectObjectDuration屬性值。

SetEnumProperty(IXamlDirectObject, XamlPropertyIndex, UInt32)

設定特定IXamlDirectObjectEnum屬性值。

SetGridLengthProperty(IXamlDirectObject, XamlPropertyIndex, GridLength)

設定特定IXamlDirectObjectGridLength屬性值。

SetInt32Property(IXamlDirectObject, XamlPropertyIndex, Int32)

設定特定IXamlDirectObjectInt32屬性值。

SetMatrix3DProperty(IXamlDirectObject, XamlPropertyIndex, Matrix3D)

設定特定IXamlDirectObjectMatrix3D屬性值。

SetMatrixProperty(IXamlDirectObject, XamlPropertyIndex, Matrix)

設定特定IXamlDirectObjectMatrix屬性值。

SetObjectProperty(IXamlDirectObject, XamlPropertyIndex, Object)

設定特定IXamlDirectObject的物件屬性值。

SetPointProperty(IXamlDirectObject, XamlPropertyIndex, Point)

設定特定IXamlDirectObjectPoint屬性值。

SetRectProperty(IXamlDirectObject, XamlPropertyIndex, Rect)

設定特定IXamlDirectObjectRect屬性值。

SetSizeProperty(IXamlDirectObject, XamlPropertyIndex, Size)

設定特定IXamlDirectObject的 Size屬性值。

SetStringProperty(IXamlDirectObject, XamlPropertyIndex, String)

設定特定IXamlDirectObject字串屬性值。

SetThicknessProperty(IXamlDirectObject, XamlPropertyIndex, Thickness)

設定特定IXamlDirectObjectThickness屬性值。

SetTimeSpanProperty(IXamlDirectObject, XamlPropertyIndex, TimeSpan)

設定特定IXamlDirectObject的 TimeSpan屬性值。

SetXamlDirectObjectProperty(IXamlDirectObject, XamlPropertyIndex, IXamlDirectObject)

設定特定 IXamlDirectObjectIXamlDirectObject屬性值。

適用於

另請參閱