A way to change its shape is with SetWindowRgn
A test :
IntPtr hWndHost = windowsXamlHostControl.Handle;
POINT[] pt;
pt = new POINT[5];
pt[0].x = (int)windowsXamlHostControl.Width/2;
pt[0].y = 0;
pt[1].x = (int)windowsXamlHostControl.Width;
pt[1].y = (int)windowsXamlHostControl.Height / 2;
pt[2].x = (int)windowsXamlHostControl.Width / 2;
pt[2].y = (int)windowsXamlHostControl.Height;
pt[3].x = 0;
pt[3].y = (int)windowsXamlHostControl.Height / 2;
pt[4].x = (int)windowsXamlHostControl.Width / 2;
pt[4].y = 0;
IntPtr hRgn = CreatePolygonRgn(ref pt[0], 10, 1);
SetWindowRgn(hWndHost, hRgn, true);
Declarations :
[DllImport("user32.dll", SetLastError = true)]
private static extern int SetWindowRgn(IntPtr hWnd, IntPtr hRgn, bool bRedraw);
[DllImport("gdi32.dll", SetLastError = true)]
private static extern IntPtr CreateRoundRectRgn(int x1, int y1, int x2, int y2, int cx, int cy);
[DllImport("gdi32.dll", SetLastError = true)]
private static extern IntPtr CreatePolygonRgn(ref POINT lpPoint, int nCount, int nPolyFillMode);
[StructLayout(LayoutKind.Sequential)]
public struct POINT
{
public int x;
public int y;
public POINT(int X, int Y)
{
this.x = X;
this.y = Y;
}
}