RadSplitButton hangs when item is selected, ContentTemplate uses Label, and content has underscore

1 Answer 31 Views
Buttons
Joe
Top achievements
Rank 1
Iron
Veteran
Iron
Joe asked on 18 Oct 2021, 07:51 PM

I have a RadSplitButton whose dropdown content is a RadListBox of 3 strings.  They are

  • Item1
  • Item_2
  • Item_3


The user clicks the dropdown, chooses a new string and it becomes the current item.

It works fine until the user clicks an item with the underscore character.   When that happens, the application hangs and the call-stack show it inside of an event handler:  RadSplitButton.CloseAllPopupsToParent.

I noticed also that the name of the item in the button does not show the underscore character.  I figured that this was because I was using a Label control instead of a TextBlock so I changed the ContentTemplate to instead use a TextBlock.  Not only did this make the underscore show, but it also removed the hang.

I understand why the underscore would not show with Label but it should not hang an application.

I've attached a small sample project to illustrate the problem. Start the app, bring up the dropdown and choose the second or third items in the list.  The app will hang.  

Change the ContentTemplate's primitive to a TextBlock and it will not hang in this case.

    1 Answer, 1 is accepted

    Sort by
    1
    Accepted
    Martin Ivanov
    Telerik team
    answered on 20 Oct 2021, 01:54 PM

    Hello Joe,

    The missing underscore is caused by the access text feature of WPF where the underscore reserves the next symbol for a key down action. To activate the corresponding symbol, you can press Alt.

    About the hang, this is a bug in the RadSplitButton. I've logged it in the feedback portal where you can track its status. You can also find your Telerik points updated.

    Regards,
    Martin Ivanov
    Progress Telerik

    Remote troubleshooting is now easier with Telerik Fiddler Jam. Get the full context to end-users' issues in just three steps! Start your trial here - https://www.telerik.com/fiddler-jam.
    Tags
    Buttons
    Asked by
    Joe
    Top achievements
    Rank 1
    Iron
    Veteran
    Iron
    Answers by
    Martin Ivanov
    Telerik team
    Share this question
    or