I would like to override the Loaded
event in my Custom control but I don't know how to do it.
I wanted to do like this example but knowing that base.OnLoaded
does not exist I don't know how to do it
https://stackoverflow.com/a/28326029/14338640
You can create a custom control and override the events. refer the below code i tried for TextBox control.
class TextBoxEx : TextBox { protected override void OnTouchUp(System.Windows.Input.TouchEventArgs e) { base.OnTouchUp(e); } protected override void OnTouchDown(System.Windows.Input.TouchEventArgs e) { base.OnTouchDown(e); } }
For information my custom control inherits from UserControl
.