WPF SystemColors: color of TextBox border

前端 未结 5 940

I am trying to make a search TextBox with an embedded magnifying glass icon. I have the following markup so far:



        
5条回答
  •  一向
    一向 (楼主)
    2020-12-17 00:50

    You might try using Microsoft.Windows.Themes.ListBoxChrome instead of the Border; that's what the default template for TextBox uses:

    
        
            
        
        
            
                
                
            
        
    
    

    You should be able to use just ListBoxChrome instead of Border rather than re-templating TextBox to match the code you presented.

提交回复
热议问题