Style Trigger to Apply another Style

前端 未结 2 925
眼角桃花
眼角桃花 2021-01-21 04:29

I am sure this has been asked before, but I haven\'t had an easy time figuring out how to phrase the query.

I have this style;



        
相关标签:
2条回答
  • 2021-01-21 04:41

    Styles cannot be set from a Setter within the Style, because then essentially the first Style would never exist at all.

    Since you're looking for a Validation style, I would recommend looking into Validation.ErrorTemplate, although if that doesn't work you can change your trigger so it modifies specific properties such as BorderBrush instead of the Style property

    0 讨论(0)
  • 2021-01-21 04:42

    i would think of using a Template with a TemplateTrigger and there you can change the style to what ever you like based on what ever condition

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