Beispiel #1
0
        void ControlView_Minimise(object sender, RoutedEventArgs e)
        {
            ControlView mw = sender as ControlView;
            Window      w  = Window.GetWindow(mw);

            w.WindowState = WindowState.Minimized;
        }
Beispiel #2
0
        void ControlView_Close(object sender, RoutedEventArgs e)
        {
            ControlView mw = sender as ControlView;
            WindowView  wv = Window.GetWindow(this) as WindowView;

            wv.HideContent(mw);
        }
Beispiel #3
0
        private static void OnNextCommand(object sender, ExecutedRoutedEventArgs e)
        {
            ControlView     mw   = sender as ControlView;
            RoutedEventArgs args = new RoutedEventArgs();

            args.RoutedEvent = NextEvent;
            mw.RaiseEvent(args);
        }
Beispiel #4
0
        public virtual void HideContent(ControlView cv)
        {
            Grid g = this.Template.FindName("PART_Modal", this) as Grid;

            if (g != null)
            {
                g.Children.Remove(cv);
            }
        }
Beispiel #5
0
        public virtual void ShowContent(ControlView cv)
        {
            WindowView wv = Window.GetWindow(this) as WindowView;

            wv.ShowContent(cv);
            return;

            Grid g = this.Template.FindName("PART_Modal", this) as Grid;

            if (g != null)
            {
                g.Children.Add(cv);
            }
        }
Beispiel #6
0
        void ControlView_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            ControlView mw = sender as ControlView;
            Window      w  = Window.GetWindow(mw);

            if (w.WindowState == WindowState.Maximized)
            {
                w.WindowState = WindowState.Normal;
            }
            else
            {
                w.WindowState = WindowState.Maximized;
            }
        }
Beispiel #7
0
        void ControlView_Maximise(object sender, RoutedEventArgs e)
        {
            ControlView mw = sender as ControlView;
            Window      w  = Window.GetWindow(mw);

            if (w.WindowState == WindowState.Maximized)
            {
                w.WindowState = WindowState.Normal;
                w.Topmost     = true;
            }
            else
            {
                w.WindowState = WindowState.Maximized;
                w.Topmost     = false;
            }
        }
Beispiel #8
0
        private static void OnSaveCommand(object sender, ExecutedRoutedEventArgs e)
        {
            ControlView mw = sender as ControlView;

            mw.DoSave();
        }