0

I have an elementhost that does not render the WPF user control correctly when inside a custom TabControl or custom TableLayoutPanel.

I have commented out each of the overriden methods inside the custom controls and found the CreateParams method to be the problem, specifically in the line cp.ExStyle |= 0x02000000;

I am not sure what the original reason for this line in the custom controls but was wondering if there was an extended window style value that is compatible with ElementHost.

    public class TableLayoutPanelWithBorders : TableLayoutPanel
    {
      protected override CreateParams CreateParams
      {
        get
        {
          CreateParams cp = base.CreateParams;
          cp.ExStyle |= 0x02000000;
          return cp;
        }
      }
    }

0 Answers0