0

I have a WPF user control that just contains a simple telerik grid. I embedded this user control into a Element host control and added the host control to a 3rd party docking library that provides Visual studio like docking functionality.

Now in my windows application all the docking works fine but when i enable the autohide for the docking container of the user control the user control is not rendered properly, it only renders when i move my pointer on the controls. Any suggestions on how to get rid of the issue? I tried updatelayout(),InvalidateVisual() none of them seems to be working. Any help is greatly appreciated.

teja_98666
  • 85
  • 1
  • 11
  • without code, not possible in your case. – AnjumSKhan Jan 28 '16 at 13:40
  • Hi, I don't have the code for the third party docking library. And the user control is just a basic control with a telerik grid bound to datasource. I can send post the code of the control if needed. – teja_98666 Jan 28 '16 at 14:16
  • what `Docking Framework` do you use? – StepUp Jan 28 '16 at 14:27
  • Thats a framework called Docking Manager developed by DotNetMagic which is no longer available now. The situation i mentioned doesnt arise if i use a simple window form and win form user control. It happens only when i use WPF user control. It seems that the WPF usercontrol doensn't repaint iteself when i click on AutoHide button. Any suggestions? – teja_98666 Jan 29 '16 at 13:32
  • `this.Loaded += delegate { var source = PresentationSource.FromVisual(this); var hwndTarget = source.CompositionTarget as HwndTarget; if (hwndTarget != null) { hwndTarget.RenderMode = RenderMode.SoftwareOnly; } };` got his from another stackoverflow question http://stackoverflow.com/questions/11859821/rendering-issue-with-wpf-controls-inside-elementhost this solved my issue. – teja_98666 Feb 02 '16 at 08:00

0 Answers0