Remarque
L’accès à cette page nécessite une autorisation. Vous pouvez essayer de vous connecter ou de modifier des répertoires.
L’accès à cette page nécessite une autorisation. Vous pouvez essayer de modifier des répertoires.
Mise à jour : novembre 2007
Conteneur de toutes les logiques d'éditeur inline pour les propriétés.
Espace de noms : Microsoft.Windows.Design.PropertyEditing
Assembly : Microsoft.Windows.Design (dans Microsoft.Windows.Design.dll)
Syntaxe
Public Class PropertyValueEditor
Dim instance As PropertyValueEditor
public class PropertyValueEditor
public ref class PropertyValueEditor
public class PropertyValueEditor
Notes
Cette classe peut contenir un seul DataTemplate pour un éditeur inline. Il sert en général à fournir un éditeur différent ou personnalisé pour une propriété dans la fenêtre Propriétés. L'éditeur inline apparaît dans la fenêtre Propriétés. Pour fournir un éditeur personnalisé dont la zone d'affichage est plus grande et qui n'est pas toujours visible, consultez ExtendedPropertyValueEditor.
La propriété InlineEditorTemplate retourne le modèle XAML pour l'interface graphique de cet éditeur. Cet élément est généralement fourni dans un ResourceDictionary situé ailleurs dans le projet.
Exemples
L'exemple de code suivant montre comment utiliser la classe PropertyValueEditor. Pour plus d'informations, consultez Procédure pas à pas : implémentation d'un éditeur de valeurs inline.
' Demonstrates creating a class that inherits PropertyValueEditor
' and setting the InlineEditorTemplate properties.
Public Class BrushEditor
Inherits PropertyValueEditor
' The EditorResources class in this example inherits ResourceDictionary
' and contains the template for the inline editor. These would be defined
' in an associated XAML file named EditorResources.xaml
Private res As New EditorResources()
Public Sub New()
Me.InlineEditorTemplate = CType(res("BrushInlineEditorTemplate"), DataTemplate)
End Sub
End Class
// Demonstrates creating a class that inherits PropertyValueEditor
// and setting the InlineEditorTemplate property.
public class BrushEditor : PropertyValueEditor
{
// The EditorResources class in this example inherits ResourceDictionary
// and contains template for the inline editor. This would be
// defined in an associated XAML file named EditorResources.xaml
private EditorResources res = new EditorResources();
public BrushEditor()
{
this.InlineEditorTemplate = res["BrushInlineEditorTemplate"] as DataTemplate;
}
}
Hiérarchie d'héritage
System.Object
Microsoft.Windows.Design.PropertyEditing.PropertyValueEditor
Microsoft.Windows.Design.PropertyEditing.DialogPropertyValueEditor
Microsoft.Windows.Design.PropertyEditing.ExtendedPropertyValueEditor
Sécurité des threads
Tous les membres static (Shared en Visual Basic) publics de ce type sont thread-safe. Il n'est pas garanti que les membres d'instance soient thread-safe.
Voir aussi
Référence
Microsoft.Windows.Design.PropertyEditing, espace de noms
Autres ressources
Architecture d'édition de propriété