I want to draw some marks over UltraProgressBar. I inherited from UltraProgressBar and overrided OnPaint method like this:
protected override void OnPaint(PaintEventArgs pe) { base.OnPaint(pe); using (Graphics gr = this.CreateGraphics()) { gr.FillRectangle(Brushes.Red, new Rectangle(10, 10, 10, 10)); } }
It's Ok when SupportThemes is true, but...! But when i want to switch SupportThemes to false it's broke at one stroke. No one of my marks is drawn.
What you will advise?
I don't think that OnPaint is the right place to do this. Your best bet is likely to use a DrawFilter, examples of which can be found in the KB, as well as shipping with the NetAdvantage SDK. You might also find the UIElementViewer handy.
-Matt
tnx. I'll try