I have some questions regarding the 'Adding smart tags' tutorial on your blog.
First of all in your example you use the controldesigner to refer to the backcolor property of the _control. But when you use custom properties(that are browsable in the properties windows) do you need to set them in the _control class or the controldesigner class?
Secondly I was wondering how to implement smart tags that changed depending on a property:
I have a bool property UserDraw, when true the class overrides the OnPaint event and creates a gradient/alpha channel background, when false the system draws the BackColor value. I have added this bool property to the smart tags and when checked/unchecked i'm trying to change the visible smart tags.
So when UserDraw = true following smart tags are visible :
-Gradient Color 1
-Gradient Color 2
when false it should show only these smart tags:
I tried this:
- Code: Select all
if (_control.userDraw == true)
it works, but only if the smart tags are closed and reopend by leaving the panel and selecting it and when deleting the object from the form i get some huge errors.