简体   繁体   中英

Double Buffer a custom control in the Compact Framework

I have a custom control that inherits from Panel . I end up putting several DataGrids and Labels on this panel. When it gets too long it auto scrolls for me.

I really need the scrolling because it is a list of scanned in objects that will grow larger than the space on the screen will allow.

But when I scroll it flickers quite a lot. I would love to have it give me some smooth scrolling.

I have seen several "Compact Framework" double buffer examples out there, but they all are double buffering draw methods (ie graphics.DrawString ). My custom control does not do any painting by itself. It just puts normal grids and labels on the panel and lets the panel paint them.

Is there a way to double buffer normal controls (again NOT custom painting)?

The Compact Framework Controls do not have the DoubleBuffered property or the underlying double-buffering mechanism. There's no way to add it either.

The only way to get double-buffering is to override the painting of the control and do your own.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM