コード例 #1
0
        static private void Executed(object sender, ExecutedRoutedEventArgs e)
        {
            // Once help key is found it call execute to show the help
            string HS = GingerHelpProvider.GetHelpString(sender as FrameworkElement);

            General.ShowGingerHelpWindow(HS);
        }
コード例 #2
0
        static private void CanExecute(object sender, CanExecuteRoutedEventArgs e)
        {
            // We check which element have Help key once found we return true
            // Click F1 on text box, if help exist it will show if not it will go to the parent control and up until found or done.

            FrameworkElement senderElement = sender as FrameworkElement;

            if (GingerHelpProvider.GetHelpString(senderElement) != null)
            {
                e.CanExecute = true;
            }
        }