public void ActivateSelectedShelf() { if (_selectedShelf != null) { _selectedShelf.Activate(); } }
/// <summary> /// Show the alert viewer shelf. /// </summary> public void Show() { if (_shelf == null) { _shelf = ApplicationComponent.LaunchAsShelf( this.Context.DesktopWindow, new AlertViewerComponent(), SR.TitleAlertViewer, ShelfName, ShelfDisplayHint.DockRight | ShelfDisplayHint.DockAutoHide); _shelf.Closed += (sender, args) => _shelf = null; } else { _shelf.Activate(); } }
void Shelf2() { if (_shelf2 == null) { TestComponent component = new TestComponent("Shelf2"); _shelf2 = ApplicationComponent.LaunchAsShelf( this.Context.DesktopWindow, component, "Shelf 2", "Shelf2", ShelfDisplayHint.DockFloat); _shelf2.Closed += delegate { _shelf2 = null; }; } else { _shelf2.Activate(); } }
void Shelf1() { if (_shelf1 == null) { TestComponent component = new TestComponent("Shelf1"); _shelf1 = ApplicationComponent.LaunchAsShelf( this.Context.DesktopWindow, component, "Shelf 1", "Shelf1", ShelfDisplayHint.DockFloat | ShelfDisplayHint.DockLeft | ShelfDisplayHint.HideOnWorkspaceOpen); _shelf1.Closed += delegate { _shelf1 = null; }; } else { _shelf1.Activate(); } }
private void ShowShelf(DesktopWindow window) { // the shelf is not currently open if (_closeHelperShelf == null) { // launch it CloseHelperComponent component = new CloseHelperComponent(); _closeHelperShelf = ApplicationComponent.LaunchAsShelf(window, component, SR.TitleCloseAssistant, "Close Assistant", ShelfDisplayHint.DockLeft); _closeHelperShelf.Closed += delegate { _closeHelperShelf = null; }; } else { _closeHelperShelf.Activate(); } CloseHelperComponent helper = (CloseHelperComponent)_closeHelperShelf.Component; helper.Refresh(); }