Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic MindFusion.Drawing.Design.BrushEditor (Read 3389 times)
nikulin_andrey
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 26
Joined: Dec 1st, 2006
MindFusion.Drawing.Design.BrushEditor
Feb 7th, 2007 at 1:12pm
Print Post  
Hi,

How can I use edit the property of MindFusion.Drawing.Brush type in PropertyGrid?

I cannot specify the Editor attribute for the property because of protection level of MindFusion.Drawing.Design.BrushEditor class.


Could you help me?

Thanks.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: MindFusion.Drawing.Design.BrushEditor
Reply #1 - Feb 7th, 2007 at 1:34pm
Print Post  
Hi,

In older versions the Editor attribute was set independently for each Brush property. In version 4.3 we have associated the Editor attribute with the Brush class, so the editor should be available for your custom properties too. We haven't released V4.3 yet - if you wish, try that with the beta version here:

https://www.mindfusion.org/_beta/FCNetDemo.zip

Stoyan
  
Back to top
 
IP Logged
 
nikulin_andrey
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 26
Joined: Dec 1st, 2006
Re: MindFusion.Drawing.Design.BrushEditor
Reply #2 - Feb 7th, 2007 at 1:40pm
Print Post  
Is there any way to use the editor with version 4.2?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: MindFusion.Drawing.Design.BrushEditor
Reply #3 - Feb 7th, 2007 at 1:52pm
Print Post  
I think this form of the Editor attribute can be used with internal classes too:

[Editor("MindFusion.Drawing.Design.BrushEditor,
   FlowChart.NET, Version=X.X.X.X, Culture=neutral,
   PublicKeyToken=xxxxxxxxxxxxxxx", typeof(UITypeEditor))]

Replace the X-es above with the exact numbers from your version of the FlowChart.NET assembly. You can see the assembly's PublicKeyToken using the ILDASM tool.

Stoyan
  
Back to top
 
IP Logged
 
nikulin_andrey
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 26
Joined: Dec 1st, 2006
Re: MindFusion.Drawing.Design.BrushEditor
Reply #4 - Feb 8th, 2007 at 7:04am
Print Post  
Thanks.

Could you explain to me please?

How the PropertyGrid control can create an instance of private MindFusion.Drawing.Design.BrushEditor class?

Thanks.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: MindFusion.Drawing.Design.BrushEditor
Reply #5 - Feb 8th, 2007 at 7:25am
Print Post  
Hi,

You can create instances of everything through reflection. Probably the property grid just looks what Editor is specified in the metadata for a property, and instantiates it without checking the access attributes specified for the editor class.

I believe the FCDemo uses the standard PropertyGrid class to display box properties as well, and the brush editor works from there even if FCDemo and PropertyGrid are not in the same assembly or namespace as BrushEditor.

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint