Esempio n. 1
0
        public virtual IWindow CreateChild(object viewModel)
        {
            var cw = new ContentWindow();
            cw.Owner = this.wpfWindow;
            cw.DataContext = viewModel;
            WindowAdapter.ConfigureBehavior(cw);

            return new WindowAdapter(cw);
        }
Esempio n. 2
0
        public virtual IWindow CreateChild(object viewModel)
        {
            var cw = new ContentWindow();

            cw.Owner       = this.wpfWindow;
            cw.DataContext = viewModel;
            WindowAdapter.ConfigureBehavior(cw);

            return(new WindowAdapter(cw));
        }
Esempio n. 3
0
 private static void ConfigureBehavior(ContentWindow cw)
 {
     cw.WindowStartupLocation = WindowStartupLocation.CenterOwner;
     cw.CommandBindings.Add(new CommandBinding(PresentationCommands.Accept, (sender, e) => cw.DialogResult = true));
 }
Esempio n. 4
0
 private static void ConfigureBehavior(ContentWindow cw)
 {
     cw.WindowStartupLocation = WindowStartupLocation.CenterOwner;
     cw.CommandBindings.Add(new CommandBinding(PresentationCommands.Accept, (sender, e) => cw.DialogResult = true));
 }