Style Trigger to Apply another Style

前端 未结 2 926
眼角桃花
眼角桃花 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

提交回复
热议问题