No built-in property editor for the WPF Pen type in Visual Studio?

368 views Asked by At

While writing a custom WPF control, I have been surprised that WPF does not provide a built-in visual editor for properties of the System.Windows.Media.Pen type. I expected to see something similar to the editor for Brush-based properties:

enter image description here

After examining the types of properties used to draw 'something' in some main stock WPF controls (Border, TextBlock, ListView, DataGrid, ...) I saw that they all do not have any Pen properties - only properties based on the Brush type.

Is it a general design concept of WPF and we should also avoid implementing Pen properties in our custom controls?

If implementing a Pen property is still 'eligible', can anybody show an example of doing this? Or do I need to write a property editor from scratch using the techniques described in the Creating Custom Editors section in the MSDN?

0

There are 0 answers