<TextBox
Name="mytextBox"
Controls:TextBoxHelper.Watermark="User"
Controls:TextBoxHelper.ClearTextButton="True" />
I have ComboBox
and each index i want to change this Watermark
accordingly.
Is it possible to change this Property
via code behind ?
If mytextBox
is not inside template or different name scope and you can access it by name in the code you can either use static method of TextBoxHelper
TextBoxHelper.SetWatermark(mytextBox, "New Value");
or set it directly
mytextBox.SetValue(TextBoxHelper.WatermarkProperty, "New Value");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With