This is a migrated thread and some comments may be shown as answers.

RadMenuItem InputGestureText

2 Answers 144 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Ristogod
Top achievements
Rank 2
Ristogod asked on 13 Oct 2010, 04:23 PM
In the standard MenuItem control there is an option for InputGestureText. However, RadMenuItem doesn't have this. So what do you do instead?

2 Answers, 1 is accepted

Sort by
0
Ristogod
Top achievements
Rank 2
answered on 14 Oct 2010, 02:28 PM
Adding an InputGestures property is in our development plans and it is in progress. You can track the PITS item created for this here. In that way you can see when it is ready to be used.
0
Mark
Top achievements
Rank 1
answered on 21 Feb 2011, 05:28 PM
For those who may be still looking for a 'workaround', I found this to be quite adequate:

<telerik:RadMenuItem>
    <telerik:RadMenuItem.Header>
        <StackPanel Orientation="Horizontal">
            <TextBlock Text="Exit" HorizontalAlignment="Left" MinWidth="100" />
            <TextBlock Text="Alt+F4" HorizontalAlignment="Right" />
        </StackPanel>
    </telerik:RadMenuItem.Header>
</telerik:RadMenuItem>

The MinWidth on the first TextBlock is important to be wide enough to be longer than all of your Menu Item Header TextBlocks (to evenly right-align all of the InputGestureText values).

There may be a more elegant way of doing this; if so, please let me know!

Cheers,
Mark
Tags
Menu
Asked by
Ristogod
Top achievements
Rank 2
Answers by
Ristogod
Top achievements
Rank 2
Mark
Top achievements
Rank 1
Share this question
or