Custom category editors
This is a continuation to my older post which described about custom property editors in blend.This post mainly discuss about creating a custom category editor and putting properties into that.
Here I am using more design specific mechanism with separate design time dlls, which was introduced with WPF technology.It helps us to keep our design time code in a separate dll which is suffixed with <assemblyname>.design.dll.You can get more information about the linking process between Control dll and design dll from here .
We are going to create a category named MyCategory like this
- Create metadata file in the design assembly ie in <customasembly>.design.dll
- Put the desired property into appropriate category using the category attribute.This is same as of Windows forms
- Create category editor and set its datatemplate.
- Use the editor attribute to associate this category editor into the custom control
- Open the solution in Blend.You can see your category editor
The new category with full customizationSome points to consider
- Make sure that the design dll and application(which is using our custom control) is refering the same custom control assembly dll.Otherwise this wont get opened in blend.
For more details refer the sample here