TargetPropertyPath 类

定义

表示目标元素上属性的路径。

public ref class TargetPropertyPath sealed
/// [Windows.Foundation.Metadata.Activatable(Microsoft.UI.Xaml.ITargetPropertyPathFactory, 65536, "Microsoft.UI.Xaml.WinUIContract")]
/// [Windows.Foundation.Metadata.Activatable(65536, "Microsoft.UI.Xaml.WinUIContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.UI.Xaml.WinUIContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class TargetPropertyPath final
[Windows.Foundation.Metadata.Activatable(typeof(Microsoft.UI.Xaml.ITargetPropertyPathFactory), 65536, "Microsoft.UI.Xaml.WinUIContract")]
[Windows.Foundation.Metadata.Activatable(65536, "Microsoft.UI.Xaml.WinUIContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.UI.Xaml.WinUIContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class TargetPropertyPath
Public NotInheritable Class TargetPropertyPath
继承
Object Platform::Object IInspectable TargetPropertyPath
属性

示例

在此示例中, myPanel.Orientation 是 , TargetPropertyPath 其中 myPanelTargetOrientation属性

<Setter Target="myPanel.Orientation" Value="Horizontal"/>

注解

TargetPropertyPath 用于在 XAML 中创建简化的虚点 Setter.Target 语法。

构造函数

TargetPropertyPath()

初始化 TargetPropertyPath 类的新实例。

TargetPropertyPath(DependencyProperty)

使用指定的目标属性初始化 TargetPropertyPath 类的新实例。

属性

Path

获取或设置目标元素上的 属性的路径。

Target

获取或设置对象,该对象包含 Path 描述的属性。

适用于

另请参阅