Esempio n. 1
0
 public static void CreateAndShow(Func<Action, ViewModelBase> contentGenerator, bool resizeable, double height, double width, string backgroundColor)
 {
     var window = new VMHostWindowView();
     var content = new VMHostWindowViewModel(contentGenerator(window.Close), backgroundColor);
     SetupWindow(window, content, resizeable, height, width);
     window.Show();
 }
Esempio n. 2
0
        public static void CreateAndShow(Func <Action, ViewModelBase> contentGenerator, bool resizeable, double height, double width, string backgroundColor)
        {
            var window  = new VMHostWindowView();
            var content = new VMHostWindowViewModel(contentGenerator(window.Close), backgroundColor);

            SetupWindow(window, content, resizeable, height, width);
            window.Show();
        }
Esempio n. 3
0
 private static void SetupWindow(VMHostWindowView window, VMHostWindowViewModel content, bool resizeable, double height, double width)
 {
     window.Owner = Application.Current.MainWindow;
     window.Height = height;
     window.Width = width;
     window.DataContext = content;
     window.ResizeMode = resizeable ? ResizeMode.CanResize : ResizeMode.NoResize;
 }
Esempio n. 4
0
 private static void SetupWindow(VMHostWindowView window, VMHostWindowViewModel content, bool resizeable, double height, double width)
 {
     window.Owner       = Application.Current.MainWindow;
     window.Height      = height;
     window.Width       = width;
     window.DataContext = content;
     window.ResizeMode  = resizeable ? ResizeMode.CanResize : ResizeMode.NoResize;
 }