/// <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(); }
/// <summary> /// Creates a shelf view for the specified shelf. /// </summary> internal IShelfView CreateShelfView(Shelf shelf) { return(this.DesktopWindowView.CreateShelfView(shelf)); }
/// <summary> /// Constructor. /// </summary> /// <param name="shelf"></param> /// <param name="desktopView"></param> protected internal ShelfView(Shelf shelf, DesktopWindowView desktopView) { _shelf = shelf; _desktopView = desktopView; }
internal Host(Shelf shelf, IApplicationComponent component) : base(component) { Platform.CheckForNullReference(shelf, "shelf"); _shelf = shelf; }
/// <summary> /// Creates a new view for the specified <see cref="Shelf"/>. /// </summary> /// <remarks> /// Override this method if you want to return a custom implementation of <see cref="IShelfView"/>. /// </remarks> /// <param name="shelf"></param> /// <returns></returns> public virtual IShelfView CreateShelfView(Shelf shelf) { throw new NotSupportedException(); }