public async void NewQueueClicked(object sender, RoutedEventArgs e) { var window = new NewQueue(GroupsCache); window.Owner = ParentQueueList; window.ShowDialog(); if (!string.IsNullOrWhiteSpace(window.NewQueueName)) { var hub = Hub; Dispatcher.InvokeAsync(() => hub.CreateQueue(window.NewQueueName, (string)window.GroupSelector.SelectedValue)); } Win32.IsApplicationActive(); }