private void OnViewModelsChanged(object sender, AudioDeviceViewModelEventArgs e) { // We refresh all commmands, so that non-device commands // (such as separaters, "no devices" text, etc are // updated based on state changes. ContextMenu.RefreshCommands(); }
private void OnViewModelsRemoved(object sender, AudioDeviceViewModelEventArgs e) { ToolStripMenuItem item = FindMenuItem(e.ViewModel); if (item != null) { ContextMenu.Items.Remove(item); } }
private void OnViewModelsAdded(object sender, AudioDeviceViewModelEventArgs e) { }