コード例 #1
0
 internal Task CloseAsync(IDrawerRef drawerRef)
 {
     if (OnCloseEvent != null)
     {
         return(OnCloseEvent.Invoke(drawerRef));
     }
     return(Task.CompletedTask);
 }
コード例 #2
0
 /// <summary>
 /// Create and Open a drawer
 /// </summary>
 private async Task DrawerService_OnCreate(IDrawerRef drawerRef)
 {
     drawerRef.Options.Visible = true;
     if (!_drawerRefs.Contains(drawerRef))
     {
         _drawerRefs.Add(drawerRef);
     }
     await InvokeAsync(StateHasChanged);
 }
コード例 #3
0
        /// <summary>
        /// Close the drawer
        /// </summary>
        private async Task DrawerService_OnClose(IDrawerRef drawerRef)
        {
            drawerRef.Options.Visible = false;
            await InvokeAsync(StateHasChanged);

            await Task.Delay(300);

            if (_drawerRefs.Contains(drawerRef))
            {
                _drawerRefs.Remove(drawerRef);
            }
        }