コード例 #1
0
        internal static void ShowHelpButton(Window window, HelpButtonClicked callbackDelegate)
        {
            var hwnd  = GetWindowHwnd(window);
            var value = GetWindowLong(hwnd, GWL_EXSTYLE);

            DisableSystemButtons(window, SystemButton.Minimize | SystemButton.Maximize);
            value |= WS_EX_CONTEXTHELP;

            SetWindowLong(hwnd, GWL_EXSTYLE, value);


            Internal.WindowMessageHelper.RegisterWindowsMessages(window, callbackDelegate);
        }
コード例 #2
0
        internal static void ShowHelpButton(Window window, HelpButtonClicked callbackDelegate)
        {
            var hwnd = GetWindowHwnd(window);
            var value = GetWindowLong(hwnd, GWL_EXSTYLE);

            DisableSystemButtons(window, SystemButton.Minimize | SystemButton.Maximize);
            value |= WS_EX_CONTEXTHELP;

            SetWindowLong(hwnd, GWL_EXSTYLE, value);

            Internal.WindowMessageHelper.RegisterWindowsMessages(window, callbackDelegate);
        }
コード例 #3
0
 internal static void RegisterWindowsMessages(Window window, HelpButtonClicked callback)
 {
     ((HwndSource) PresentationSource.FromVisual(window)).AddHook(new HwndSourceHook(WindowMessage));
     _window = window;
     _callback = callback;
 }
コード例 #4
0
 internal static void RegisterWindowsMessages(Window window, HelpButtonClicked callback)
 {
     ((HwndSource)PresentationSource.FromVisual(window)).AddHook(new HwndSourceHook(WindowMessage));
     _window   = window;
     _callback = callback;
 }
コード例 #5
0
 protected internal virtual void OnHelpButtonClicked(EventArgs e)
 {
     HelpButtonClicked?.Invoke(this, e);
 }
コード例 #6
0
 /// <summary>
 /// Hides the minimize and maximize buttons and displays a help button (?) instead of them.
 /// </summary>
 /// <param name="target"></param>
 /// <param name="callbackDelegate">The function to be called when the ?-button is clicked.</param>
 public static void ShowHelpButton(this Window target, HelpButtonClicked callbackDelegate)
 {
     Internal.SystemMenuManager.ShowHelpButton(target, callbackDelegate);
 }
コード例 #7
0
 private void HELP_BUTTON_Click(object sender, EventArgs e)
 {
     HelpButtonClicked?.Invoke( );
 }
コード例 #8
0
 /// <summary>
 /// Hides the minimize and maximize buttons and displays a help button (?) instead of them.
 /// </summary>
 /// <param name="target"></param>
 /// <param name="callbackDelegate">The function to be called when the ?-button is clicked.</param>
 public static void ShowHelpButton(this Window target, HelpButtonClicked callbackDelegate)
 {
     Internal.SystemMenuManager.ShowHelpButton(target, callbackDelegate);
 }