public void ShowAutoHideWindow(AutoHideTabItem item, View view) { if (view == this.AutoHideWindowElement) { return; } this.CloseAutoHideWindow(); AutoHideChannelControl ancestor1 = Microsoft.VisualStudio.PlatformUI.ExtensionMethods.FindAncestor <AutoHideChannelControl>((Visual)item); AutoHideRootControl ancestor2 = Microsoft.VisualStudio.PlatformUI.ExtensionMethods.FindAncestor <AutoHideRootControl>((Visual)item); if (ancestor1 == null || ancestor2 == null) { return; } this.AutoHideWindowElement = view; this.AutoHideChannelControl = ancestor1; this.AutoHideWindow = new AutoHideWindow(); this.AutoHideWindow.DataContext = (object)view; this.AutoHideWindow.DockRootElement = ancestor2.DockRoot; this.AutoHideChannelControl.AutoHideSlideout = (object)this.AutoHideWindow; LayoutSynchronizer.Update((Visual)this.AutoHideWindow); if (!this.AutoHideWindowElement.IsActive) { this.StartMouseObserver(item); } this.AutoHideWindow.RaiseEvent((RoutedEventArgs) new ViewEventArgs(AutoHideWindow.SlideoutStartedEvent, this.AutoHideWindowElement)); this.AutoHideWindow.RaiseEvent((RoutedEventArgs) new ViewEventArgs(AutoHideWindow.SlideoutCompletedEvent, this.AutoHideWindowElement)); }
private static void OnContentChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args) { HwndContentControl hwndContentControl = (HwndContentControl)obj; hwndContentControl.HwndSourcePresenter.Content = args.NewValue; LayoutSynchronizer.Update((Visual)hwndContentControl.HwndSourcePresenter); }
public bool ShowInFront() { using (LayoutSynchronizer.BeginLayoutSynchronization()) { if (!this.Show()) { return(false); } this.IsSelected = true; return(true); } }
public bool Show() { using (LayoutSynchronizer.BeginLayoutSynchronization()) { if (this.IsVisible) { return(true); } if (!this.RaiseShowing()) { return(false); } this.IsVisible = true; Microsoft.VisualStudio.PlatformUI.ExtensionMethods.RaiseEvent(this.Shown, (object)this); return(true); } }