Custom Dropdown Editor

Grids for WPF Forum

Posted 12 years ago by Andrew Robinson
Version: 11.2.0554
Avatar

Hi,

I'd like to create a custom thickness editor that works in a similar way to your colour editor. For example, in your PropertyGrid Integration (Custom) demo you have Fill and Stroke properties that display the colour and value as the property value and then, when the drop-down is activated, display a custom colour editor. In my case I'd like to put a custom thickness editor in the drop-down and then display the current thickness value in the property value using the normal thickness format. For example Margin 1cm,1cm,1cm,1cm. Can you advise how I can achieve a similar look-and-feel to your colour editor?

Thanks

Andrew

Comments (1)

Answer - Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Andrew,

If you are using the WPF Thickness type, then we have a ThicknessEditBox in our Editors for WPF product. You can hook up a custom control for the drop-down by setting the DropDownContent/Template property. You can also leverage our PartEditBox (again in our Editors for WPF product) to build a custom editor if you are using a different thickness type. We have a sample that shows how to build a Social Security Number editor in our Sample Browser.

As for the PropertyGrid, it simply leverages other WPF controls and doesn't really provide it's own. The default property editors leverage the native WPF ComboBox and TextBox controls. But you can use any custom control in there, including our Editors for WPF controls (which can be easily integrated into the PropertyGrid).


Actipro Software Support

The latest build of this product (v24.1.3) was released 24 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.