private void OnContextChanged() { vm = DataContext as GenericSearchSettingsModel; if (vm != null) { shortcuts = new ShortcutManager(Entry, vm); } }
private void OnContextChanged() { if (vm != null) { vm.PropertyChanged -= PropertyChanged; } vm = DataContext as ChannelViewModelBase; if (vm == null) { return; } shortcuts = new ShortcutManager(Entry, vm); vm.PropertyChanged += PropertyChanged; }
private void OnContextChanged() { vm = DataContext as GenericSearchSettingsModel; if (vm != null) shortcuts = new ShortcutManager(Entry, vm); }
private void OnContextChanged() { if (vm != null) vm.PropertyChanged -= PropertyChanged; vm = DataContext as ChannelViewModelBase; if (vm == null) return; shortcuts = new ShortcutManager(Entry, vm); vm.PropertyChanged += PropertyChanged; }