CollectionControlDialog
Inheritance: System.Windows.Window, System.Windows.Markup.IComponentConnector
        private void CollectionControlButton_Click(object sender, RoutedEventArgs e)
        {
            var collectionControlDialog = new CollectionControlDialog();

            collectionControlDialog.ItemsSource     = this.ItemsSource;
            collectionControlDialog.NewItemTypes    = this.NewItemTypes;
            collectionControlDialog.ItemsSourceType = this.ItemsSourceType;
            collectionControlDialog.IsReadOnly      = this.IsReadOnly;
            collectionControlDialog.ShowDialog();
        }
        private void CollectionControlButton_Click(object sender, RoutedEventArgs e)
        {
            var collectionControlDialog = new CollectionControlDialog();
            var binding = new Binding("ItemsSource")
            {
                Source = this, Mode = BindingMode.TwoWay
            };

            BindingOperations.SetBinding(collectionControlDialog, CollectionControlDialog.ItemsSourceProperty, binding);
            collectionControlDialog.NewItemTypes    = this.NewItemTypes;
            collectionControlDialog.ItemsSourceType = this.ItemsSourceType;
            collectionControlDialog.IsReadOnly      = this.IsReadOnly;
            collectionControlDialog.ShowDialog();
        }
Ejemplo n.º 3
0
        private void CollectionControlButton_Click(object sender, RoutedEventArgs e)
        {
            var collectionControlDialog = new CollectionControlDialog();
            var binding = new Binding("ItemsSource")
            {
                Source = this, Mode = BindingMode.TwoWay
            };

            BindingOperations.SetBinding(collectionControlDialog, CollectionControlDialog.ItemsSourceProperty, binding);
            collectionControlDialog.NewItemTypes      = this.NewItemTypes;
            collectionControlDialog.ItemsSourceType   = this.ItemsSourceType;
            collectionControlDialog.IsReadOnly        = this.IsReadOnly;
            collectionControlDialog.EditorDefinitions = this.EditorDefinitions;
            var collectionUpdated = collectionControlDialog.ShowDialog();

            if (collectionUpdated.HasValue && collectionUpdated.Value)
            {
                this.RaiseEvent(new RoutedEventArgs(CollectionControlButton.CollectionUpdatedEvent, this));
            }
        }
 private void CollectionControlButton_Click( object sender, RoutedEventArgs e )
 {
   CollectionControlDialog collectionControlDialog = new CollectionControlDialog();
   collectionControlDialog.ItemsSource = this.ItemsSource;
   collectionControlDialog.NewItemTypes = this.NewItemTypes;
   collectionControlDialog.ItemsSourceType = this.ItemsSourceType;
   collectionControlDialog.IsReadOnly = this.IsReadOnly;
   collectionControlDialog.ShowDialog();
 }