void OnPlayerCollectionRemove(object sender, PlayerEventArgs e) { OnPlayerLoggedOut(e.Player); this.Dispatcher.InvokeIfRequired(() => { BindingOperations.GetBindingExpression(clientListBox, ListView.ItemsSourceProperty).UpdateTarget(); }, DispatcherPriority.DataBind); }
void OnPlayerCollectionChanged(object sender, PlayerEventArgs e) { this.Dispatcher.InvokeIfRequired(() => { BindingOperations.GetBindingExpression(characterComboBox, ListView.ItemsSourceProperty).UpdateTarget(); }, DispatcherPriority.DataBind); }