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

后端 未结 9 1506
余生分开走
余生分开走 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条回答
  •  盖世英雄少女心
    2021-02-04 09:23

    I think this is what you're after (again, got around to it using Expression Blend, but its the most minimalist I could get in terms of what it displays...and it took a lot of playing around with)...you can just drop the following in a blank WPF application as an example:

    
        
            
            
            
            
            
            
            
            F1 M 10.0,1.2 L 4.7,9.1 L 4.5,9.1 L 0,5.2 L 1.3,3.5 L 4.3,6.1L 8.3,0 L 10.0,1.2 Z
            
            
                
                    
                        
                            
                        
                        
                    
                
                
                    
                    
                    
                        
                        
                    
                    
                        
                    
                    
                        
                            
                            
                        
                        
                        
                    
                
            
            
            
            
            M 0,4 L 3.5,0 L 7,4 Z
            
            
            M 0,0 L 3.5,4 L 7,0 Z
            
            
                
                    
                        
                            
                            
                        
                        
                        
                        
                            
                                
                                    
                                        
                                            
                                        
                                        
                                        
                                    
                                
                            
                        
                    
                
                
                    
                        
                    
                    
                    
                        
                    
                    
                        
                        
                    
                    
                        
                        
                    
                    
                        
                        
                    
                
            
            
                
                    
                        
                            
                            
                        
                        
                        
                        
                    
                
                
                    
                        
                    
                    
                        
                        
                    
                    
                        
                        
                    
                    
                        
                        
                    
                    
                        
                            
                            
                        
                        
                        
                    
                
            
            M 0,0 L 4,3.5 L 0,7 Z
            
                
                    
                        
                            
                            
                            
                            
                            
                            
                        
                        
                        
                            
                        
                        
                        
                        
                        
                            
                                
                                    
                                        
                                            
                                        
                                        
                                        
                                    
                                
                            
                        
                    
                
                
                    
                        
                    
                    
                        
                    
                    
                        
                        
                    
                    
                        
                        
                    
                    
                        
                        
                        
                    
                    
                        
                        
                    
                
            
            
        
        
            
                
                    
                
            
        
    
    

提交回复
热议问题