C
Chris
I am creating my own controls for compact framework 3.5. My control class
inherits from Control class. Then I override OnPaint method.
My question is about properties - imagine there is a property that changes
any graphic look of the control:
public bool MyProp
{
get {/*something*/}
set
{
_myprop=value;
this.Invalidate();
}
}
Is it a good idea to call Invalidate methos there? Of course I want to
repaint the control after setting the property (in design mode and runtime
mode as well).
Now, I have other problem - I have created my own combobox control.
Unfortunatelly, when the app is running, the control repaints oll the time
(OnPaint methid is being called all the time) why? can it be caused, that I
am calling Invalidate() method after setting each of the properties?
inherits from Control class. Then I override OnPaint method.
My question is about properties - imagine there is a property that changes
any graphic look of the control:
public bool MyProp
{
get {/*something*/}
set
{
_myprop=value;
this.Invalidate();
}
}
Is it a good idea to call Invalidate methos there? Of course I want to
repaint the control after setting the property (in design mode and runtime
mode as well).
Now, I have other problem - I have created my own combobox control.
Unfortunatelly, when the app is running, the control repaints oll the time
(OnPaint methid is being called all the time) why? can it be caused, that I
am calling Invalidate() method after setting each of the properties?