Relative Content

Tag Archive for c#wpfhwndhost

HwndHost has a black edge

I am using HwndHost to create a Win32 window inside a Wpf desktop application to use it for rendering with OpenGL. The HwndHost object is the Child element of a Border and it gets its size from this Border. However, it also gets a fixed 1-pixel black edge on the left and at the bottom and no matter what I tried, these annoying black lines are there. I thought it was a rounding error and made sure the Border has integer values as width and height but it did not help.
Any ideas why this happens would be appreciated.