Profile Picture

C# Winform example with property pages

Posted By Jarrett Robertson 11 Years Ago
Author
Message
Jarrett Robertson
Posted 11 Years Ago
View Quick Profile
Junior Member

Junior Member (12 reputation)Junior Member (12 reputation)Junior Member (12 reputation)Junior Member (12 reputation)Junior Member (12 reputation)Junior Member (12 reputation)Junior Member (12 reputation)Junior Member (12 reputation)Junior Member (12 reputation)

Group: Forum Members
Last Active: 11 Years Ago
Posts: 12, Visits: 1
In the examples->All Examples->User Interface->Editors available at runtime you show a property page that has line properties that launch the NStrokeStyleTypeEditor. When I looked at the source code it doesn't show the property pages. Is there a way for me to achieve this same effect of embedding that form? I tried the standard way of using property pages but I wasn't able to get it to work.

Any help would be appreciated.

Nevron Support
Posted 11 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)

Group: Forum Members
Last Active: Last Year
Posts: 3,039, Visits: 3,746
Hello Jarrett,

To be able to display NStrokeStyleTypeEditor when an object which has property of type NStrokeStyle is put in a PropertyGrid you need to set Editor attribute to this property which specifies the editor.
Here is an example class.

public class Test
{
   [Editor(typeof(NStrokeStyleTypeEditor), typeof(UITypeEditor))]
   public NStrokeStyle StrokeStyle
   {
      get
      {
         return m_StrokeStyle;
      }
      set
      {
         m_StrokeStyle = value;
      }
   }

   private NStrokeStyle m_StrokeStyle;
}

I hope this helps.


Best Regards,
Nevron Support Team



Jarrett Robertson
Posted 11 Years Ago
View Quick Profile
Junior Member

Junior Member (12 reputation)Junior Member (12 reputation)Junior Member (12 reputation)Junior Member (12 reputation)Junior Member (12 reputation)Junior Member (12 reputation)Junior Member (12 reputation)Junior Member (12 reputation)Junior Member (12 reputation)

Group: Forum Members
Last Active: 11 Years Ago
Posts: 12, Visits: 1
Sorry for the late reply. I recently was able to implement the code you suggested and it worked great. Thank you!



Similar Topics


Reading This Topic