PropertyPath Classe

Définition

Implémente une structure de données pour décrire une propriété comme un chemin sous une autre propriété ou sous un type propriétaire. Les chemins de propriété sont utilisés dans la liaison de données à des objets.

public ref class PropertyPath sealed : DependencyObject
/// [Windows.Foundation.Metadata.Activatable(Windows.UI.Xaml.IPropertyPathFactory, 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 PropertyPath final : DependencyObject
/// [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(Windows.UI.Xaml.IPropertyPathFactory, 65536, "Windows.Foundation.UniversalApiContract")]
class PropertyPath final : DependencyObject
[Windows.Foundation.Metadata.Activatable(typeof(Windows.UI.Xaml.IPropertyPathFactory), 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 PropertyPath : DependencyObject
[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(typeof(Windows.UI.Xaml.IPropertyPathFactory), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class PropertyPath : DependencyObject
Public NotInheritable Class PropertyPath
Inherits DependencyObject
Héritage
Object Platform::Object IInspectable DependencyObject PropertyPath
Attributs

Configuration requise pour Windows

Famille d’appareils
Windows 10 (introduit dans 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduit dans v1.0)

Remarques

La main raison pour laquelle vous pouvez utiliser un objet PropertyPath est de cloner des propriétés de liaison existantes et de les utiliser ailleurs :

  • Obtenez le chemin d’accès à partir d’une liaison existante (Binding.Path).
  • Utilisez cette valeur de chaîne pour construire un nouveau PropertyPath.
  • Créez une liaison. Utilisez le nouveau PropertyPath pour son Binding.Path (et ajustez probablement d’autres propriétés également).
  • Appliquez la nouvelle liaison à une autre combinaison objet-propriété, à l’aide de SetBinding.

Le ciblage d’animation utilise également un concept de chemin de propriété, comme indiqué dans la rubrique syntaxe property-path . Toutefois, le ciblage d’animation n’utilise pas PropertyPath comme type sous-jacent, il exprime les chemins sous forme de chaînes et utilise des chaînes pour tous les appels d’API associés.

Constructeurs

PropertyPath(String)

Initialise une nouvelle instance de la classe PropertyPath en fonction d’une chaîne de chemin d’accès.

Propriétés

Dispatcher

Obtient le CoreDispatcher auquel cet objet est associé. CoreDispatcher représente une installation qui peut accéder à DependencyObject sur le thread d’interface utilisateur, même si le code est initié par un thread autre que l’interface utilisateur.

(Hérité de DependencyObject)
Path

Obtient la valeur de chemin d’accès détenue par ce PropertyPath.

Méthodes

ClearValue(DependencyProperty)

Efface la valeur locale d’une propriété de dépendance.

(Hérité de DependencyObject)
GetAnimationBaseValue(DependencyProperty)

Retourne toute valeur de base établie pour une propriété de dépendance, qui s’applique dans les cas où une animation n’est pas active.

(Hérité de DependencyObject)
GetValue(DependencyProperty)

Retourne la valeur effective actuelle d’une propriété de dépendance à partir d’un objet DependencyObject.

(Hérité de DependencyObject)
ReadLocalValue(DependencyProperty)

Retourne la valeur locale d’une propriété de dépendance, si une valeur locale est définie.

(Hérité de DependencyObject)
RegisterPropertyChangedCallback(DependencyProperty, DependencyPropertyChangedCallback)

Inscrit une fonction de notification pour écouter les modifications apportées à un DependencyProperty spécifique sur ce instance DependencyObject.

(Hérité de DependencyObject)
SetValue(DependencyProperty, Object)

Définit la valeur locale d’une propriété de dépendance sur un DependencyObject.

(Hérité de DependencyObject)
UnregisterPropertyChangedCallback(DependencyProperty, Int64)

Annule une notification de modification précédemment inscrite en appelant RegisterPropertyChangedCallback.

(Hérité de DependencyObject)

S’applique à

Voir aussi