public void OrganizeView() { var tableView = GrdDisco.View as TableView; if (tableView != null) { tableView.BestFitColumns(); } GrdDisco.ExpandAllGroups(); }
/// <summary> /// Called when [first time show]. /// </summary> protected override void OnFirstTimeRender() { DataContext = new DiscoInfoViewModel(); base.OnFirstTimeRender(); ((DiscoInfoViewModel)DataContext).PropertyChanged += (s, e) => { (GrdDisco.View as TableView).BestFitColumns(); GrdDisco.ExpandAllGroups(); }; }
/// <summary> /// Initializes a new instance of the <see cref="MonitorCloudView"/> class. /// </summary> public MonitorCloudView() { InitializeComponent(); Vm.PropertyChanged += (s, e) => { var tableView = GrdDisco.View as TableView; if (tableView != null) { tableView.BestFitColumns(); } GrdDisco.ExpandAllGroups(); }; Loaded += (s, e) => Vm.Initialize(); }