Ejemplo n.º 1
0
 private static void VolumeShelf_Closed(object sender, ClosedEventArgs e)
 {
     // note that the component is thrown away when the shelf is closed by the user
     _volumeShelf.Closed -= VolumeShelf_Closed;
     _volumeShelf         = null;
     _volumeComponent     = null;
 }
Ejemplo n.º 2
0
        public void Show()
        {
            if (_volumeComponent == null)
            {
                // create and initialize the layout component
                _volumeComponent = new VolumeComponent(this.Context.DesktopWindow);

                // launch the layout component in a shelf
                _volumeShelf = ApplicationComponent.LaunchAsShelf(
                    this.Context.DesktopWindow,
                    _volumeComponent,
                    SR.TitleVolumeController,
                    ShelfDisplayHint.DockLeft);

                _volumeShelf.Closed += VolumeShelf_Closed;
            }
        }