Bug Report T300799
Visible to All Users

WindowsUI Flyout - The hot key prefix is visible in the button's caption

created 9 years ago

Hello,

Facing an issue with a WindowsUI application.

I've added french satellite assemblies (fr) to my application (did not alter them !).

Button caption text shown in flyout (eg.  "Annu&ler") is incorrect.

Don't know where to start… Not just a translation error… The & should set the accelerator character and be removed…

Demo application + screenshot in attachment !

Regards,

Tom

Answers approved by DevExpress Support

created 9 years ago

We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

    created 9 years ago

    Hi Tom,

    To show the prefix, set Flyout's Properties.AppearanceButtons.TextOptions.HotkeyPrefix property to Show:

    C#
    this.flyout1.Properties.AppearanceButtons.Options.UseTextOptions = true; this.flyout1.Properties.AppearanceButtons.TextOptions.HotkeyPrefix = DevExpress.Utils.HKeyPrefix.Show;

    Note that the Alt+Character hotkey will not work in this case since this functionality is not supported.

    Let me know if you have additional questions.

      Comments (3)

        Perhaps the problem is not clear…

        1. Don't wan't to show the HotKeys !
        2. Don't want the "&" between the "Annu&ler" to be shown…
          Problem occurs when using 'french' localization. No problem for 'english' localization.
          Did some digging…
          A "Cancel" button used in a flyout dialog uses the following resource: StringId.XtraMessageBoxCancelButtonText
          From the DevExpress localization webapp:
          StringId.XtraMessageBoxCancelButtonText = (english) &Cancel, (french) Annu&ler
          Why is the english caption shown correctly and the french shown incorrectly ?
          Regards,
          Tom

          Did some further digging…
          from DevExpress.XtraBars assembly …
          private static class DialogResultFlyoutCommandLocalizer
          {
          public static string GetText(DialogResult target)
          {
          string localizedString;
          switch (target)
          {
          case DialogResult.OK:
          localizedString = Localizer.Active.GetLocalizedString(StringId.XtraMessageBoxOkButtonText);
          break;
          case DialogResult.Cancel:
          localizedString = Localizer.Active.GetLocalizedString(StringId.XtraMessageBoxCancelButtonText);
          break;
          case DialogResult.Abort:
          localizedString = Localizer.Active.GetLocalizedString(StringId.XtraMessageBoxAbortButtonText);
          break;
          case DialogResult.Retry:
          localizedString = Localizer.Active.GetLocalizedString(StringId.XtraMessageBoxRetryButtonText);
          break;
          case DialogResult.Ignore:
          localizedString = Localizer.Active.GetLocalizedString(StringId.XtraMessageBoxIgnoreButtonText);
          break;
          case DialogResult.Yes:
          localizedString = Localizer.Active.GetLocalizedString(StringId.XtraMessageBoxYesButtonText);
          break;
          case DialogResult.No:
          localizedString = Localizer.Active.GetLocalizedString(StringId.XtraMessageBoxNoButtonText);
          break;
          default:
          return target.ToString();
          }
          return localizedString.Trim(new char[]
          {
          '&'
          });
          }
          }
          Trim is incorrect !
          Regards,
          Tom

          DM DM
          Dmitry Mit (DevExpress) 9 years ago

            Hi,
            Thank you for your clarification. I was able to reproduce the issue and passed this ticket to our developers for further research. We will update this thread once we have any results.  As a workaround, you can set the flyout1.Properties.AppearanceButtons.TextOptions.HotkeyPrefix property to DevExpress.Utils.HKeyPrefix.Hide.

            Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

            Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.