Ejemplo n.º 1
0
 public SelectObjectWindow(ISelectObjectWindowVM viewModel)
 {
     InitializeComponent();
     listBox.DisplayMemberPath = viewModel.DisplayMemberPath;
     this.viewModel            = viewModel;
     DataContext = viewModel;
 }
 public SelectObjectWindow(ISelectObjectWindowVM viewModel)
 {
     InitializeComponent();
     listBox.DisplayMemberPath = viewModel.DisplayMemberPath;
     this.viewModel = viewModel;
     DataContext = viewModel;
 }
 public static object Select(string title, ISelectObjectWindowVM vm)
 {
     SelectObjectWindow dlg = new SelectObjectWindow(vm);
     dlg.Title = title;
     dlg.Owner = Application.Current.MainWindow;
     dlg.ShowDialog();
     if (dlg.DialogResult == true)
     {
         return dlg.SelectedObject;
     }
     return null;
 }
Ejemplo n.º 4
0
        public static object Select(string title, ISelectObjectWindowVM vm)
        {
            SelectObjectWindow dlg = new SelectObjectWindow(vm);

            dlg.Title = title;
            dlg.Owner = Application.Current.MainWindow;
            dlg.ShowDialog();
            if (dlg.DialogResult == true)
            {
                return(dlg.SelectedObject);
            }
            return(null);
        }