2

I have WPF control placed on Windows Forms SplitContainer with ElementHost. When I dragged the splitter, I got unpleasant artifacts on place of my WPF control. How can I manage with that trouble.

lce
  • 45
  • 5

1 Answers1

0

In my experience hosting WPF controls in a ElementHost is never perfect and always produces some rendering issues. There's some discussion on a few workarounds here that might help.

Community
  • 1
  • 1
IanR
  • 4,703
  • 3
  • 29
  • 27
  • Thank you. I've found an issue of my problem there. I've disabled hardware accelaration of WPF Control rendering. Code:`code`public partial class UserControl1 : UserControl { public UserControl1() { InitializeComponent(); this.Loaded += delegate { var source = PresentationSource.FromVisual(this); var hwndTarget = source.CompositionTarget as HwndTarget; if (hwndTarget != null) { hwndTarget.RenderMode = RenderMode.SoftwareOnly; } }; } }`code` – lce Jul 27 '11 at 14:37