winforms パネル要素をダブルバッファリングしようとしています。パネルを使って形を描いています。現在、次のようなものがあります。
class BufferPanel : Panel {
public BufferPanel() {
this.DoubleBuffer = true;
}
}
Mouse movement triggers the panel Refresh(). Some shapes are drawn in when Paint is triggered This is where I have a problem. These shapes are only drawn for a split second after mouse movement triggers a Refresh, then completely vanish. It's like they are only drawn on one buffer or something along those lines. This appears to only happen with Paint. For example, I can copy/paste the shapes into the mouse move method, and everything will work fine. Any thoughts on why?