コード例 #1
0
 void childControl_VisibilityChanged(object sender, HiddenEvent e)
 {
     if (e.isHidden)
     {
         //close control here
     }
 }
コード例 #2
0
 void Hide()
 {
     LeanTween.scale(gameObject, Vector3.zero, animationDuration).setEase(animationEase).setOnComplete(() =>
     {
         shown = false;
         HiddenEvent?.Invoke(this);
         // gameObject.SetActive(false);
     });
 }
コード例 #3
0
 private async Task OnAnimationEnd(string id)
 {
     BSModalEvent = new BSModalEvent()
     {
         Target = this
     };
     if (id != MyRef.Id)
     {
         await new BlazorStrapInterop(JSRuntime).RemoveEventAnimationEnd(MyRef);
         if (IsOpen ?? false)
         {
             await ShownEvent.InvokeAsync(BSModalEvent).ConfigureAwait(false);
         }
         else
         {
             await HiddenEvent.InvokeAsync(BSModalEvent).ConfigureAwait(false);
         }
         _canShow = IsOpen ?? false;
         _drawing = false;
         await InvokeAsync(StateHasChanged).ConfigureAwait(false);
     }
 }
コード例 #4
0
 void yourControl_VisibilityChanged(object sender, HiddenEvent e)
 {
     //This is your main form
     //dispose control here
 }
コード例 #5
0
 public virtual void Hide()
 {
     gameObject.SetActive(false);
     HiddenEvent?.Invoke(this);
 }