TargetPropertyPath 类

定义

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

public ref class TargetPropertyPath sealed
/// [Windows.Foundation.Metadata.Activatable(Windows.UI.Xaml.ITargetPropertyPathFactory, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 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.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.Activatable(Windows.UI.Xaml.ITargetPropertyPathFactory, 65536, "Windows.Foundation.UniversalApiContract")]
class TargetPropertyPath final
[Windows.Foundation.Metadata.Activatable(typeof(Windows.UI.Xaml.ITargetPropertyPathFactory), 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class TargetPropertyPath
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.UI.Xaml.ITargetPropertyPathFactory), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class TargetPropertyPath
Public NotInheritable Class TargetPropertyPath
继承
Object Platform::Object IInspectable TargetPropertyPath
属性

Windows 要求

设备系列
Windows 10 (在 10.0.10240.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v1.0 中引入)

示例

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

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

注解

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

构造函数

TargetPropertyPath()

初始化 TargetPropertyPath 类的新实例。

TargetPropertyPath(DependencyProperty)

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

属性

Path

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

Target

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

适用于

另请参阅