Пример #1
0
        private void CommandBinding_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            IInputElement focusedControl = FocusManager.GetFocusedElement(Application.Current.Windows[1]);

            if (focusedControl is DependencyObject)
            {
                string str = HelpProvider.GetHelpKey((DependencyObject)focusedControl);
                Console.WriteLine("--> " + str);
                if (str == "er")
                {
                    HelpProvider.ShowHelp("tip", this.mainWindow);
                }
                else
                {
                    HelpProvider.ShowHelp(str, this.mainWindow);
                }
            }
        }
Пример #2
0
        private void CommandBinding_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            IInputElement focusedControl = FocusManager.GetFocusedElement(Application.Current.Windows[0]);

            if (focusedControl is DependencyObject)
            {
                string str = HelpProvider.GetHelpKey((DependencyObject)focusedControl);
                if (str == "er")
                {
                    str = "Dragg";
                    HelpProvider.ShowHelp(str, this);
                }
            }
            else
            {
                HelpProvider.ShowHelp("Dragg", this);
            }
        }
Пример #3
0
        private void CommandBinding_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            IInputElement focusedControl = FocusManager.GetFocusedElement(Application.Current.Windows[1]);

            if (focusedControl is DependencyObject)
            {
                string str = HelpProvider.GetHelpKey((DependencyObject)focusedControl);
                if (str == "er")
                {
                    if (TagComboBox.SelectedItem != null)
                    {
                        HelpProvider.ShowHelp("s", this.mainWindow);
                    }
                    else
                    {
                        HelpProvider.ShowHelp("man", this.mainWindow);
                    }
                }
                else
                {
                    HelpProvider.ShowHelp(str, this.mainWindow);
                }
            }
        }