Beispiel #1
0
        /// <summary>
        ///Occurs when the command associated with this CommandBinding executes.
        /// </summary>
        private static void OnExecuteAdd(object sender, ExecutedRoutedEventArgs e)
        {
            ManipulatorView manipulatorwnd = new ManipulatorView();

            manipulatorwnd.removenormalCol.Visibility = Visibility.Collapsed;
            manipulatorwnd.removecol_Tilte.Visibility = Visibility.Collapsed;
            manipulatorwnd.ShowDialog();
        }
Beispiel #2
0
        /// <summary>
        ///Occurs when the command associated with this CommandBinding executes.
        /// </summary>
        private static void OnExecuteRemove(object sender, ExecutedRoutedEventArgs e)
        {
            ManipulatorView manipulatorwnd = new ManipulatorView();

            manipulatorwnd.addnormalCol.Visibility = Visibility.Collapsed;
            manipulatorwnd.addcolarea.Visibility   = Visibility.Collapsed;
            manipulatorwnd.Height = 165;
            manipulatorwnd.ShowDialog();
        }
Beispiel #3
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 #4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ZipCodeEditBehavior"/> class.
        /// </summary>
        public ZipCodeEditBehavior()
            : base((s, e) =>
        {
            GridViewModel vm         = (GridViewModel)(s as Button).DataContext;
            ManipulatorView editView = new ManipulatorView(new ManipulatorViewModel(vm.SelectedZipCode, true));
            editView.Owner           = Application.Current.MainWindow;

            if ((bool)editView.ShowDialog())
            {
                return((editView.DataContext as ManipulatorViewModel).ZipInfo);
            }
            return(null);
        })
        { }