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

            if ((bool)addView.ShowDialog())
            {
                return(viewModel.ZipInfo);
            }
            return(null);
        })
        { }
Beispiel #2
0
 public ManipulatorView(ManipulatorViewModel zipCodeEditorModel)
 {
     InitializeComponent();
     this.DataContext = zipCodeEditorModel;
 }