Method wpfBuilder.Watermark(+ 1 overload)
Overload
Sets watermark/hint/cue text of the last added TextBox or editable ComboBox control. The text is visible only when the control text is empty.
public wpfBuilder Watermark(string text)
Parameters
text (string)
Watermark text. |
Returns
Exceptions
NotSupportedException
The last added element isn't TextBox or editable ComboBox control. |
InvalidOperationException
The control isn't in an AdornerDecorator. |
Remarks
The control must be a child/descendant of an AdornerDecorator. See example.
Examples
b.R.Add<AdornerDecorator>().Add(out TextBox text1, WBAdd.ChildOfLast).Watermark("Water");
More examples in Cookbook.
Overload(top)
Sets watermark/hint/cue text of the last added TextBox or editable ComboBox control. The text is visible only when the control text is empty.
public wpfBuilder Watermark(out WatermarkAdorner adorner, string text)
Parameters
adorner (WatermarkAdorner)
Receives the adorner. It can be used to change watermark text later. |
text (string)
Watermark text. |
Returns
Exceptions
NotSupportedException
The last added element isn't TextBox or editable ComboBox control. |
InvalidOperationException
The control isn't in an AdornerDecorator. |
Remarks
The control must be a child/descendant of an AdornerDecorator. See example.
Examples
b.R.Add<AdornerDecorator>().Add(out TextBox text1, WBAdd.ChildOfLast).Watermark("Water");
More examples in Cookbook.