PropertyValueEditor Class
Container for any and all inline editor logic for properties.
Namespace: Microsoft.Windows.Design.PropertyEditing
Assembly: Microsoft.Windows.Design (in Microsoft.Windows.Design.dll)
Syntax
'Declaration
Public Class PropertyValueEditor
'Usage
Dim instance As PropertyValueEditor
public class PropertyValueEditor
public ref class PropertyValueEditor
public class PropertyValueEditor
Remarks
This class can hold a single DataTemplate for an inline editor. This is typically used to provide a different or custom editor for a property in the Properties window. The inline editor appears within the Properties window. To provide a custom editor that has a larger screen area and is not always visible, see ExtendedPropertyValueEditor.
The InlineEditorTemplate property returns the XAML template for the visual interface for this editor. This is typically provided in a ResourceDictionary elsewhere in the project.
Examples
The following code example shows how to use the PropertyValueEditor class. For more information, see Walkthrough: Implementing an Inline Value Editor.
' 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;
}
}
Inheritance Hierarchy
System.Object
Microsoft.Windows.Design.PropertyEditing.PropertyValueEditor
Microsoft.Windows.Design.PropertyEditing.DialogPropertyValueEditor
Microsoft.Windows.Design.PropertyEditing.ExtendedPropertyValueEditor
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also
Reference
Microsoft.Windows.Design.PropertyEditing Namespace