Unplanned
Last Updated: 26 Feb 2024 12:32 by Stenly
Stenly
Created on: 26 Feb 2024 12:32
Category: WatermarkTextBox
Type: Feature Request
1
WatermarkTextBox: Expose API for controlling the label position

The RadWatermarkTextBox control updates the position of the floating label when it gets/loses focus. This moves the label to the center or to the top based on whether the control is focused or is losing the focus. This is done via a method that is currently private. 

We can expose the method so that it can be used based on the client's logic.

Currently, the method can be invoked as follows:

Type radWatermarkTextBoxType = typeof(RadWatermarkTextBox);

MethodInfo handleLabelStateChangeMethodInfo = radWatermarkTextBoxType.GetMethod("HandleLabelStateChange", BindingFlags.NonPublic | BindingFlags.Instance);

if (handleLabelStateChangeMethodInfo != null)
{
    handleLabelStateChangeMethodInfo.Invoke(this.radWatermarkTextBoxInstance, new object[1] { false });
}

0 comments