Custom Property Editor

Grids for WPF Forum

Posted 9 years ago by EXAKOM
Version: 10.1.0521
Avatar
Hello,
I am trying to make a custom property editor.
I have different classes with properties on which I added some properties attributes like:

BitmapImage m_Image = null;

[Category("Appearance")]
[Description("Image property")]
[Browsable(true)]
public BitmapImage Image
{
   get
   {
      return m_Image;
   }
   set
   {
      m_Image = value;
   }
}
I would like to make in this case a custom property editor to have a button to load an image file. I am having troubles to achieve this.
Later on, I will have to implement an existing control into a property editor, I guess if I can get this image sample to work, then it will be easy to move forward with my control.
I would really appreciate some help.
Thanks :)

Comments (1)

Posted 9 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Nicholas,

Our Sample Browser includes several examples of creating custom property editors. In your case, you may want to look at the Editors Interop (Custom) demo. This leverages the EditorAttribute, and can be used to decorate the property with the associated editor. There are other ways to associate a property editor though.


Actipro Software Support

The latest build of this product (v2018.1 build 0675) was released 8 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.