First build a class, such as NativeMethods.cs
Class nativemethods{Public const int ws_caption=0x00c0000; public const int ws_border=0x00800000; public const int ws_dlgframe=0x00400000; public const int GWL_STYLE=-16; [DllImport ("user32", entrypoint= "GetWindowLong")] public static extern int GetWindowLong (INTPTR handle, int sytle); [DllImport ("user32", entrypoint= "SetWindowLong")] public static extern int SetWindowLong (INTPTR handle, int oldstyle, int new Style);}
And then in your form code, like MainWindow.xaml.cs.
public partial class mainwindow:window{IntPtr hwnd=new System.Windows.Interop.WindowInteropHelper (this). Handle; int Oldstyle=nativemethods.getwindowlong (Hwnd,nativemethods.gwl_style); Nativemethods.setwindowlong (hwnd,nativemethods.gwl_style,oldstyle&~nativemethods.ws_border&~ Nativemethods.ws_caption&~nativemethods.ws_dlgframe);} Public MainWindow () {InitializeComponent (); This. loaded+=window_loaded; Other statements in the form}
This makes the outer window without a native button (maximum minimum off), no border, no border.
WPF de-border conflicts with WebBrowser