Exemplo 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();
 }
Exemplo 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();
        }
Exemplo 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;
 }
Exemplo 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;
 }