Exemple #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CustomerAddBehavior"/> class.
        /// </summary>
        public CustomerAddBehavior()
            : base((s, e) =>
        {
            ManipulatorViewModel viewModel = new ManipulatorViewModel(new Customers(), false);
            ManipulatorView addView        = new ManipulatorView(viewModel);
            addView.Owner = Application.Current.MainWindow;

            if ((bool)addView.ShowDialog())
            {
                return(viewModel.CustomerInfo);
            }
            return(null);
        })
        { }
Exemple #2
0
 public ManipulatorView(ManipulatorViewModel CustomerEditorModel)
 {
     InitializeComponent();
     this.DataContext = CustomerEditorModel;
 }