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

Header Text Left & Right

1 Answer 25 Views
ContextMenu
This is a migrated thread and some comments may be shown as answers.
SUNNY
Top achievements
Rank 1
SUNNY asked on 01 Jul 2012, 07:53 AM
I want my context menu item to have Text on left and keyboard shortcut on right. I dont want to give fixed width as my Text size can increase/decrease based on localized string

I tried putting Grid but the Width of the Grid is not getting 100% of the Item. 

 <telerik:RadMenuItem>
                <telerik:RadMenuItem.Header>                  
                    <Grid >
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="1*"/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>

                        <TextBlock Text="Bigger Globalizeddddddddddd  TExt"  />
                        <TextBlock Text="Shift + Insert" Grid.Column="1" />
                    </Grid>
                </telerik:RadMenuItem.Header>
                <telerik:RadMenuItem.Icon>
                    <Image Source="someicon"/>
                </telerik:RadMenuItem.Icon>
            </telerik:RadMenuItem>


Is there any way we can add additional column to context menu item just as image column so it always come on right seperate from header?

Or is there any solution to this problem?



1 Answer, 1 is accepted

Sort by
0
Dani
Telerik team
answered on 02 Jul 2012, 07:06 AM
Hello Sunny,

You can simply set the HorizontalContentAlignment property of the RadMenuItem to Stretch. The Grid will then stretch to the available space.

Hope this helps.

All the best,
Dani
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Tags
ContextMenu
Asked by
SUNNY
Top achievements
Rank 1
Answers by
Dani
Telerik team
Share this question
or