CategoryEditor Class
An abstract class for creating custom category editors.
Inheritance Hierarchy
System.Object
Microsoft.Windows.Design.PropertyEditing.CategoryEditor
Namespace: Microsoft.Windows.Design.PropertyEditing
Assembly: Microsoft.Windows.Design.Interaction (in Microsoft.Windows.Design.Interaction.dll)
Syntax
'Declaration
Public MustInherit Class CategoryEditor
public abstract class CategoryEditor
public ref class CategoryEditor abstract
[<AbstractClass>]
type CategoryEditor = class end
public abstract class CategoryEditor
The CategoryEditor type exposes the following members.
Constructors
Name | Description | |
---|---|---|
CategoryEditor | Initializes a new instance of the CategoryEditor class. |
Top
Properties
Name | Description | |
---|---|---|
EditorTemplate | When overridden in a derived class, gets a DataTemplate that acts as the UI for a CategoryEditor. | |
TargetCategory | When overridden in a derived class, gets a localized string that indicates which category this editor belongs to. |
Top
Methods
Name | Description | |
---|---|---|
ConsumesProperty | When overridden in a derived class, called once for each property in the category to determine which properties are edited by this CategoryEditor. | |
CreateEditorAttribute(Type) | Utility method that creates a new EditorAttribute for the specified CategoryEditor type. | |
CreateEditorAttribute(CategoryEditor) | Utility method that creates a new EditorAttribute for the specified CategoryEditor. | |
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetImage | When overridden in a derived class, returns an object that the host can place into a ContentControl in order to display it. | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Remarks
Derive from this class to provide a custom CategoryEditor for a set of properties in a property browser host. This class represents a custom user interface for editing a related set of properties, such as the properties in the Text category.
The TargetCategory property indicates the category of related properties that this editor is meant to edit. For example, several text-related properties are displayed in the Properties window under the Text category. If an editor is designed to edit these properties, the TargetCategory property returns "Text".
The EditorTemplate property returns the XAML template for the visual interface for this editor. This is typically provided in a ResourceDictionary elsewhere in the project.
Note that before a CategoryEditor will be used by the designer, it must be registered. For more information, see Providing Design-time Metadata.
Examples
The following code example shows how to use the CategoryEditor class. For more information, see Walkthrough: Creating a Category Editor.
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