protected override HandleRef BuildWindowCore(HandleRef hwndParent)
 {
     DestroyHost();
     _host = new WinFormsAvaloniaControlHost {Content = _content};
     UnmanagedMethods.SetParent(_host.Handle, hwndParent.Handle);
     return new HandleRef(this, _host.Handle);
 }
예제 #2
0
 /// <summary>
 /// Builds the window.
 /// </summary>
 /// <param name="hwndParent"></param>
 /// <returns></returns>
 protected override HandleRef BuildWindowCore(HandleRef hwndParent)
 {
     DestroyHost();
     _host = new WinFormsAvaloniaControlHost {
         Content = _content
     };
     UnmanagedMethods.SetParent(_host.Handle, hwndParent.Handle);
     return(new HandleRef(this, _host.Handle));
 }
예제 #3
0
 void DestroyHost()
 {
     _host?.Dispose();
     _host = null;
 }
 void DestroyHost()
 {
     _host?.Dispose();
     _host = null;
 }