Change the color of ellipse when mouse over

后端 未结 2 1217
傲寒
傲寒 2021-01-20 11:53

I\'m totally new in WPF. It\'s kind of confusing, why the first code snippet works fine (when mouse over, the color changes) but the second one doesn\'t work?



        
相关标签:
2条回答
  • 2021-01-20 12:38

    The difference is the line

    <Setter Property="Fill" Value="Blue" />
    

    Read more on ControlTemplates.

    http://msdn.microsoft.com/en-us/library/ms743230.aspx

    0 讨论(0)
  • 2021-01-20 12:38

    This purely because of the Property value precedence. The below link got an excellent explanation.

    WPF Trigger won't set property if set in Element

    0 讨论(0)
提交回复
热议问题