Inheritance: System.Windows.Controls.ContentControl
Beispiel #1
0
 public static async Task Increment()
 {
     if (Interlocked.Increment(ref _count) == 1)
     {
         _current = UIThreadHelper.Instance.Invoke(() => new ContainerHost());
         await _current.ShowWindowAsync();
     }
 }
Beispiel #2
0
        public static async Task Decrement()
        {
            if (Interlocked.Decrement(ref _count) == 0)
            {
                await _current.CloseWindowAsync();

                _current = null;
            }
        }
Beispiel #3
0
        public ContainerHost(Window window)
        {
            _window         = window;
            _current        = this;
            _firstEmptySlot = 0;

            HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
            VerticalAlignment   = VerticalAlignment.Stretch;
            _grid = new Grid {
                RowDefinitions    = { new RowDefinition() },
                ColumnDefinitions = { new ColumnDefinition() }
            };
            Content = _grid;
            UpdateWindowSize();
        }
Beispiel #4
0
 public static async Task Decrement() {
     if (Interlocked.Decrement(ref _count) == 0) {
         await _current.CloseWindowAsync();
         _current = null;
     }
 }
Beispiel #5
0
 public static async Task Increment() {
     if (Interlocked.Increment(ref _count) == 1) {
         _current = UIThreadHelper.Instance.Invoke(() => new ContainerHost());
         await _current.ShowWindowAsync();
     }
 }