public void CloseMe(object param) { ManagerReportsView MRV = param as ManagerReportsView; DockPanel wp = MRV.Parent as DockPanel; wp.Children.Remove(MRV); }
private void OpenReports(object param) { DockPanel mainGrid = param as DockPanel; if (managerReportsView == null || !mainGrid.Children.Contains(managerReportsView)) { managerReportsViewModel = new ManagerReportsViewModel(_registryServices, _managerReportServices, _managerLiquidServices); managerReportsView = new ManagerReportsView(managerReportsViewModel); mainGrid.Children.Add(managerReportsView); } else { mainGrid.Children.Remove(managerReportsView); managerReportsView = null; managerReportsViewModel = null; } }