I create a custom control, inherit from Textbox,and override the function OnGotFocus and OnLostFocus in control.
Then when I use the control, the Caret do not disappear after focus is lost.
I check the property IsFocused in function OnLostFocus, the value is false.But why the Caret do not disappear ?
Thanks.
You should call the base class’ methods,
base.OnGotFocus()andbase.OnLostFocus()after your custom logic in the child class.