Results 1 to 3 of 3

Thread: Blank space at the end of menu item

Hybrid View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2010
    Posts
    68

    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 Attached Images  
    Last edited by sharethl; Apr 4th, 2012 at 09:23 AM.

  2. #2
    Frenzied Member Lightning's Avatar
    Join Date
    Oct 2002
    Location
    Eygelshoven
    Posts
    1,611

    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.
    VB6 & C# (WCF LINQ) mostly


    If you need help with a WPF/WCF question post in the NEW WPF & WCF forum and we will try help the best we can

    My site

    My blog, couding troubles and solutions

    Free online tools

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jan 2010
    Posts
    68

    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.

    Quote Originally Posted by Lightning View Post
    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 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
  •  



Click Here to Expand Forum to Full Width