private void ExecuteOpenIncidentExplorerCommand() { IncidentExplorerViewModel ievm = new IncidentExplorerViewModel(); if (ievm.IsOpen == false) { ievm.IsOpen = true; IncidentExplorer incidentExplorer = new IncidentExplorer { DataContext = ievm }; ievm.GetAllIncidentReports(); ShellFillerShell sfs = new ShellFillerShell() { DataContext = this }; sfs.MainScroll.Content = incidentExplorer; sfs.Header.Text = "Incident Explorer"; PlaceOrFocusControlInShell(IncidentExplorerViewModel.Position, sfs, false, null); return; } PlaceOrFocusControlInShell(IncidentExplorerViewModel.Position, null, true, "Incident Explorer"); }
public IncidentExplorer() { InitializeComponent(); DataContext = new IncidentExplorerViewModel(); }