protected override void OnViewLoaded(object view) { base.OnViewLoaded(view); var window = (view as FrameworkElement).GetWindow(); _inputBindings = new InputBindings(window); _inputBindings.RegisterCommands(GetInputBindingCommands()); }
protected override void OnViewLoaded(object view) { base.OnViewLoaded(view); // load the saved window positions _window = view as Window; if (_window != null) { _window.Closing += WindowClosing; // SetPlacement will adjust the position if it's outside of the visible boundaries _window.SetPlacement(Options.WindowPosition); _notifyIcon = new NotifyIcon(_window, _eventAggregator); if (_host.DebugLogging) { ShowLoggingEnabledNotification(); } //Application.Current.LoadRibbonTheme(); _inputBindings = new InputBindings(_window); } _inputBindings.RegisterCommands(GetInputBindingCommands()); _eventAggregator.PublishOnBackgroundThread(new LoadQueryHistoryAsyncEvent()); }
protected override void OnViewLoaded(object view) { base.OnViewLoaded(view); // load the saved window positions _window = view as Window; _window.Closing += windowClosing; // SetPlacement will adjust the position if it's outside of the visible boundaries //_window.SetPlacement(Properties.Settings.Default.MainWindowPlacement); _window.SetPlacement(Options.WindowPosition); notifyIcon = new NotifyIcon(_window, _eventAggregator); if (_host.DebugLogging) { ShowLoggingEnabledNotification(); } //Application.Current.LoadRibbonTheme(); _inputBindings = new InputBindings(_window); _inputBindings.RegisterCommands(GetInputBindingCommands()); }
public void ResetInputBindings() { _inputBindings.DeregisterCommands(); _inputBindings.RegisterCommands(GetInputBindingCommands()); }
public void InitializeGestures() { InputBindings.RegisterCommands(GetActionBindings(), this.GetHashCode()); }