开发者

Silverlight: Is there a way to globally change the validation template?

开发者 https://www.devze.com 2023-02-15 01:40 出处:网络
Is there a way to globally change the validation template? I need开发者_JAVA百科 to make a couple of minor tweaks to it and I don\'t want to have to edit every single template.To my knowledge, no ther

Is there a way to globally change the validation template? I need开发者_JAVA百科 to make a couple of minor tweaks to it and I don't want to have to edit every single template.


To my knowledge, no there isn't. If you're talking about the red border and the sliding popup around TextBoxes, ComboBoxes, etc. They are coded into each control's own ControlTemplate and not referenced (like a Behavior) from a common source. You'd have to redefine the implicit styles for all used basic control, or write your own validation behavior which is independent of the control (e.g. put a red border around it and write some text too) and attach it to every control you use.

0

精彩评论

暂无评论...
验证码 换一张
取 消