public async void AsyncConstruction() { if (Common.Window != null) { await Common.Window.Dispatcher.InvokeAsync(() => { ListItem = new ProcessInstanceListItem(this, InstanceProcess); if (Common.Window.ContentFrame.Content.GetType() == typeof(WindowSelectionPage)) { (Common.Window.ContentFrame.Content as WindowSelectionPage).OpenWindowsList.Children.Add(ListItem); } }, DispatcherPriority.Background); } }
internal void ChangeSelectedProcess(ProcessInstanceListItem item) { foreach (WindowInstance i in WindowInstanceManager.Windows) { if (i.InstanceProcess.Id.Equals(item.ProcessID)) { WindowInstanceManager.SelectedWindowInstance = i; } } foreach (ProcessInstanceListItem i in OpenWindowsList.Children) { i.IsSelected = false; i.Main.Background = new SolidColorBrush(Color.FromArgb(100, 0, 0, 0)); } item.Main.Background = SystemParameters.WindowGlassBrush; }