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

            if ((bool)addView.ShowDialog())
            {
                return(viewModel.OrdersInfo);
            }
            return(null);
        })
        { }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ManipulatorView"/> class.
 /// </summary>
 /// <param name="viewModel">The view model.</param>
 public ManipulatorView(ManipulatorViewModel viewModel)
 {
     InitializeComponent();
     this.DataContext = viewModel;
 }