private void PluginEntry_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e) { _vm = e.NewValue as PluginEntryVM; // ?? throw new InvalidOperationException("DataContext must be of type `PluginEntryVM`"); if (!_vm?.Plugin?.Supported ?? false) { mainPluginGrid.ToolTip = "Not compatible with your hardware."; } }
private void PluginEntry_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e) { _vm = e.NewValue as PluginEntryVM; // ?? throw new InvalidOperationException("DataContext must be of type `PluginEntryVM`"); }
public PluginEventArgs(PluginEntryVM vm) { ViewModel = vm; }