Apr 4th, 2012, 09:14 AM
#1
Thread Starter
Lively Member
Blank space at the end of menu item
Hi
1. Does any one know why there is a blank at the end of menuItem?
How to make full use of menu item's space?
Change Grid.Width doesn't help.
2. When click non-buttons area of first menu item (like rectangle area), how to avoid context menu disappear?
Attached a picture and code.
Thanks
Code:
<ContextMenu x:Key="RightClickMenu" >
<Grid Width="200">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Width="30" Content="ID"/>
<ComboBox Grid.Column="1" Width="60" x:Name="cbID" Loaded="OnIDComboboxLoaded" />
<Button Grid.Column="2" Width="60" x:Name="btnChangeID" Content="Change" Click="OnChangeIDButtonID_Click"/>
<Button Grid.Column="3" Width="60" x:Name="btnClearID" Content="Clear ID"/>
</Grid>
</ContextMenu>
Attached Images
Last edited by sharethl; Apr 4th, 2012 at 09:23 AM .
Apr 5th, 2012, 02:07 PM
#2
Re: Blank space at the end of menu item
First thing I would try is to set the width of the columns (in the columndefinition), second thing you could change is the width of the contextmenu.
Apr 5th, 2012, 02:44 PM
#3
Thread Starter
Lively Member
Re: Blank space at the end of menu item
I add a width property to Contextmenu, 250,
see the second item, right side triangle can not be seem but it is still there.
Originally Posted by
Lightning
First thing I would try is to set the width of the columns (in the columndefinition), second thing you could change is the width of the contextmenu.
Attached Images
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width