Exemplo n.º 1
0
 public WindowSettings(
     string baseTitle,
     WindowStyles style,
     WindowResizeModes resizeMode,
     WindowSizeToContents sizeToContent,
     WindowViewStates state)
 {
     this.BaseTitle     = baseTitle;
     this.Style         = style;
     this.ResizeMode    = resizeMode;
     this.SizeToContent = sizeToContent;
     this.State         = state;
 }
Exemplo n.º 2
0
        public void ChangeWindowState(WindowViewStates states)
        {
            var toState = states.GetEnum <WindowState>();

            switch (toState)
            {
            case WindowState.Maximized:
                this._beforeMaximizedSizeToContent = this.SizeToContent;
                this.SizeToContent = SizeToContent.Manual;
                break;

            case WindowState.Normal:
            case WindowState.Minimized:
                this.SizeToContent = this._beforeMaximizedSizeToContent;
                break;
            }

            this.WindowState = toState;
        }
Exemplo n.º 3
0
 public void ChangeWindowState(IWindowView windowView, WindowViewStates states)
 {
     windowView.ChangeWindowState(states);
 }
Exemplo n.º 4
0
        public void ChangeWindowState(IWindowContext windowContext, WindowViewStates states)
        {
            var windowView = this.GetWindowView(windowContext);

            windowView?.ChangeWindowState(states);
        }