WPF - How to style the menu control to remove the left margin?

后端 未结 9 1637
余生分开走
余生分开走 2021-02-04 08:41

I have added a default menu control to my user control. I need to style the menu to remove the left margin containing the space for the icon or checkbox. How can I do this?

9条回答
  •  Happy的楠姐
    2021-02-04 09:09

    Use a RadMenuGroupItem.

    RadMenuGroupItem inherits from RadMenuItem class and it is used as container of a RadMenuItem dropdown. In other words any UI element can be placed inside of RadMenuGroupItem. By default the background color of RadMenuGroupItem is White and there is no Icon area with different color unlike RadMenuItem, so you can easily use different sized Icons in the dropdown. In addition to this RadMenuGroupItem also has a Header property which is displayed on the top of all the group items.

    
    
    
        
            
            
            
        
    
    

    And this is the result:

提交回复
热议问题