C# Winform example with property pages


Author
Message
Jarrett Robertson
Jarrett Robertson
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
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
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K
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
Jarrett Robertson
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
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!
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search