Ejemplo n.º 1
0
        private static GridDataVisibleColumns Validate(object s, RoutedEventArgs args)
        {
            GridDataControl gridData            = Application.Current.MainWindow.FindName("grid") as GridDataControl;
            var             visibleColumns      = gridData.VisibleColumns;
            var             totalVisibleColumns = gridData.Model.GetVisibleColumns();
            ObservableCollection <ColumnChooserItems> totalColumns = GetColumnsDetails(totalVisibleColumns, visibleColumns);
            ColumnChooserViewModel viewModel         = new ColumnChooserViewModel(totalColumns);
            ColumnChooserWindow    ColumnChooserView = new ColumnChooserWindow(viewModel);

            ColumnChooserView.Owner = Application.Current.MainWindow;

            if ((bool)ColumnChooserView.ShowDialog())
            {
                ClickOKButton(viewModel.ColumnCollection, gridData);
            }
            return(null);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ColumnChooserWindow"/> class.
 /// </summary>
 /// <param name="viewModel">The view model.</param>
 public ColumnChooserWindow(ColumnChooserViewModel viewModel)
 {
     InitializeComponent();
     this.DataContext = viewModel;
 }