Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
340
Draw over UltraProgressBar. (SupportThemes = false)
posted

 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? 


Parents
  • 37774
    posted

    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

Reply Children