I am newbie to WPF.In my UserControl,I have 8 labels and its respective 8 textboxes as follows:
1.Label : abc 2.Label : def
TextBox1 : TextBox2 :
3.Label :xyz 4. Label : ghi
Textbox3 : TextBox4 :
Each of these textbox text property should contain text ending with its respective label name
for TextBox1.text
should be xxxx.abc
, TextBox2.text
should be xxxx.def and so on.if not textbox should have red border.
hope I am clear with the details.So Do i need to write different ValidationRule
for each textbox??
Any you inputs??
Why not have one
ValidationRule
implementation, with a property exposing what the field should end with, e.g:Then you can use this like so: