WPF C# - Change the brush of a menu's background

后端 未结 2 1818
失恋的感觉
失恋的感觉 2020-12-17 18:31

Does anyone know how to change the brush for a menu\'s background? This sounds simple, but I don\'t see any obvious way to do this. You\'d think that the Background property

2条回答
  •  情深已故
    2020-12-17 18:55

    I'd suggest using a tool called kaxaml for writing styles. It includes several code snippets, a color picker and a nice way to instantly see what changes in the xaml code does. Here is a full menu style for what you are trying to do. Just change the brush colors at the top to suit to your needs.

    
      
    
      
      
      
      
      
      
      
      
      
    
    
        
    
            
    
                
    
                
    
                
            
        
      
    
    

提交回复
热议问题