Exemplo n.º 1
0
 private void Show()
 {
     if (DockManager.GetFloatingWindowStrategy(DockControl) == FloatingWindowStrategy.Native)
     {
         Window window = new Window();
         window.WindowStyle           = WindowStyle.None;
         window.ResizeMode            = ResizeMode.NoResize;
         window.ShowInTaskbar         = false;
         window.SizeToContent         = SizeToContent.WidthAndHeight;
         window.Owner                 = Window.GetWindow(DockControl);
         window.AllowsTransparency    = true;
         window.Background            = null;
         window.Focusable             = false;
         window.WindowStartupLocation = WindowStartupLocation.CenterOwner;
         window.Content               = this;
         window.Show();
     }
     else
     {
         Grid grid = new Grid();
         VerticalAlignment   = VerticalAlignment.Center;
         HorizontalAlignment = HorizontalAlignment.Center;
         grid.Children.Add(this);
         _floatingWindowAdorner = FloatingWindowAdorner.Add(DockControl, grid);
         UpdateLayout();
     }
     MoveFocus(new TraversalRequest(FocusNavigationDirection.Next));
 }
Exemplo n.º 2
0
 private void InitWpfStrategy()
 {
     _wpfFloatingWindowClient = new WpfFloatingWindowClient(_dockControl);
     FloatingWindowAdorner.Add(_dockControl, _wpfFloatingWindowClient);
 }