Example #1
0
        private void ToggleDecoration(object sender, MouseButtonEventArgs e)
        {
            if (e.ChangedButton != MouseButton.Left)
            {
                return;
            }

            var newLeft = _showingDecoration
                ? Left - LeftBorderWidth
                : Left + LeftBorderWidth;
            var newTop = _showingDecoration
                ? Top + TitleBarHeight
                : Top - TitleBarHeight;
            var newWindow =
                new PreviewWindow(_toPreview, newLeft, newTop, !_showingDecoration)
            {
                WindowClosed = WindowClosed
            };

            newWindow.Show();
            Close();
        }