IsMouseOver trigger doesn't work when using ShowDialog and borderless window

后端 未结 3 1749
谎友^
谎友^ 2020-12-28 22:35

I have two Windows for an application. One of them is MainWindow and the other is for settings. SettingsWindow opens when settings but

3条回答
  •  粉色の甜心
    2020-12-28 22:59

    This works for me: Define a style resource (for the button) under settings Window.Resources - This style then sets the new Template (a border), the default background as blue, and the IsMouseOver trigger to change it to red. Reference the style either explicitly for implicitly (both worked for me).

    Link to small test project: https://1drv.ms/u/s!AhlMAmchX3R6nDJ1MXS6DxlRXtnA

    
    
        
        
        
            
        
    
        
            
            

提交回复
热议问题