RadMenuItem InputGestureText

3 posts, 0 answers
  1. Ristogod
    Ristogod avatar
    63 posts
    Member since:
    Aug 2008

    Posted 13 Oct 2010 Link to this post

    In the standard MenuItem control there is an option for InputGestureText. However, RadMenuItem doesn't have this. So what do you do instead?
  2. Ristogod
    Ristogod avatar
    63 posts
    Member since:
    Aug 2008

    Posted 14 Oct 2010 Link to this post

    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.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Mark
    Mark avatar
    7 posts
    Member since:
    Nov 2010

    Posted 21 Feb 2011 Link to this post

    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
Back to Top