Page 1 of 1

ViewXY w\ SampleLineSeries, horrendous flickering issue

Posted: Wed Apr 15, 2015 7:40 pm
by greggorob64
As mentioned in my other thread, I'm using creating and adding a SeriesEventMarker on every mousemove event. This worked pretty flawlessly, until i change one specific property. As soon as I set Height\Width on the PoitnShapeStyle, the graph started uncontrollably flickering. In the screencap below, if I comment out the selected text, all flickering goes away and I get desired performance.

Thanks in advance!

Url to GIF of the flickering. If I comment out the 'size' property, the flickering goes away and works great.
http://gyazo.com/fd5f1b932fc8159cf60dfe90e33b1ef4

Image

Re: ViewXY w\ SampleLineSeries, horrendous flickering issue

Posted: Fri Apr 17, 2015 12:07 pm
by ArctionPasi
It flickers because

Height = Width = this.PreferenceTrackPointShapeSize.

Here in the initializer list, Width actually is the Form's width. It takes it from the class scope, not from PointShapeStyle's scope. Parent class Width is set, typically Form, and hence the flickering.

Do it like this instead

Code: Select all

 PointShapeStyle markerShape = new PointShapeStyle(null)
            {
                BorderWidth = 1,
                
                //Height = Width = 21, //Width is form's width!  
                Height = this.PreferenceTrackPointShapeSize,
                Width = this.PreferenceTrackPointShapeSize, //this Width is for PointShapeStyle 
                
            };

Re: ViewXY w\ SampleLineSeries, horrendous flickering issue

Posted: Fri Apr 17, 2015 12:48 pm
by greggorob64
Thanks for finding my bug :P.

Ive just started using the object initializer syntax and having quite gotten in down apparently.