protected override void OnAttached()
 {
     try
     {
         EcoreKeyEvents.Instance.KeyDown += OnKeyDown;
         _targetKeyName = InputEvents.GetAccessKey(Element);
     }
     catch (Exception e)
     {
         Log.Error(UIControls.Tag, $"Failed to attach the effect : {e.Message}");
     }
 }