Ejemplo n.º 1
0
        private void editWindowItem_Click(object sender, RoutedEventArgs e)
        {
            var editWindow = new EditWindow() { DataContext = this };
            editWindow.BindToProperty(null, new System.Windows.Data.Binding("Value")
            {
                Mode = BindingMode.TwoWay,
                Converter = new RevitProjectUnitsConverter(),
                //ConverterParameter = Measure,
                NotifyOnValidationError = false,
                Source = this,
                UpdateSourceTrigger = UpdateSourceTrigger.Explicit
            });

            editWindow.ShowDialog();
        }
Ejemplo n.º 2
0
        private void editWindowItem_Click(object sender, RoutedEventArgs e)
        {
            var viewModel = GetDynamoViewModelFromMenuItem(sender as MenuItem);
            var editWindow = new EditWindow(viewModel) { DataContext = this };
            editWindow.BindToProperty(null, new System.Windows.Data.Binding("Value")
            {
                Mode = BindingMode.TwoWay,
                Converter = new MeasureConverter(),
                ConverterParameter = _measure,
                NotifyOnValidationError = false,
                Source = this,
                UpdateSourceTrigger = UpdateSourceTrigger.Explicit
            });

            editWindow.ShowDialog();
        }