PropertyPath クラス

定義

プロパティを別のプロパティの下または所有する型の下のパスとして記述するためのデータ構造を実装します。 プロパティ パスは、オブジェクトへのデータ バインディングで使用されます。

public ref class PropertyPath sealed : DependencyObject
/// [Windows.Foundation.Metadata.Activatable(Microsoft.UI.Xaml.IPropertyPathFactory, 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 PropertyPath final : DependencyObject
[Windows.Foundation.Metadata.Activatable(typeof(Microsoft.UI.Xaml.IPropertyPathFactory), 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 PropertyPath : DependencyObject
Public NotInheritable Class PropertyPath
Inherits DependencyObject
継承
Object Platform::Object IInspectable DependencyObject PropertyPath
属性

注釈

PropertyPath オブジェクトを操作する主な理由は、既存のバインド プロパティを複製し、別の場所で使用することです。

  • 既存のバインド (Binding.Path) からパスを取得します。
  • その文字列値を使用して、新しい PropertyPathを構築します。
  • 新しいバインドを作成 しますBinding.Path に新しいPropertyPathを使用します (また、他のプロパティも調整する可能性があります)。
  • SetBinding を使用して、新しい Binding を別のオブジェクト とプロパティの組み合わせに適用します。

アニメーションのターゲット設定では、プロパティ パスの構文に関するトピックで説明されているように、 プロパティ パス の概念も使用されます。 ただし、アニメーション ターゲットは基になる型として PropertyPath を使用せず、パスを文字列として表し、関連するすべての API 呼び出しに文字列を使用します。

コンストラクター

名前 説明
PropertyPath(String)

パス文字列に基づいて PropertyPath クラスの新しいインスタンスを初期化します。

プロパティ

名前 説明
Dispatcher

Windows アプリ SDK アプリで常に null を返します。 代わりに DispatcherQueue を使用してください。

(継承元 DependencyObject)
DispatcherQueue

このオブジェクトが関連付けられている DispatcherQueue を取得します。 DispatcherQueueは、コードが非 UI スレッドによって開始された場合でも、UI スレッド上のDependencyObjectにアクセスできる機能を表します。

(継承元 DependencyObject)
Path

この PropertyPath によって保持されているパス値を取得します。

メソッド

名前 説明
ClearValue(DependencyProperty)

依存関係プロパティのローカル値をクリアします。

(継承元 DependencyObject)
GetAnimationBaseValue(DependencyProperty)

依存関係プロパティに対して確立された基本値を返します。これは、アニメーションがアクティブでない場合に適用されます。

(継承元 DependencyObject)
GetValue(DependencyProperty)

DependencyObject から依存関係プロパティの現在の有効な値を返します。

(継承元 DependencyObject)
ReadLocalValue(DependencyProperty)

ローカル値が設定されている場合は、依存関係プロパティのローカル値を返します。

(継承元 DependencyObject)
RegisterPropertyChangedCallback(DependencyProperty, DependencyPropertyChangedCallback)

この DependencyObject インスタンスの特定の DependencyProperty への変更をリッスンするための通知関数を登録します。

(継承元 DependencyObject)
SetValue(DependencyProperty, Object)

DependencyObject の依存関係プロパティのローカル値を設定します。

(継承元 DependencyObject)
UnregisterPropertyChangedCallback(DependencyProperty, Int64)

RegisterPropertyChangedCallback を呼び出して以前に登録した変更通知を取り消します。

(継承元 DependencyObject)

適用対象

こちらもご覧ください