Ejemplo n.º 1
0
        public static Task ShowDrawer <T>(DrawerDirection direction = DrawerDirection.Right)
        {
            UserControl?view = CreateView <T>();

            if (view == null || ShowingDrawer == null)
            {
                return(Task.CompletedTask);
            }

            return(ShowingDrawer.Invoke(view, direction));
        }
Ejemplo n.º 2
0
        public static Task ShowDrawer(object view, DrawerDirection direction = DrawerDirection.Right)
        {
            if (!(view is UserControl control))
            {
                throw new Exception("Invalid view");
            }

            if (ShowingDrawer == null)
            {
                return(Task.CompletedTask);
            }

            return(ShowingDrawer.Invoke(control, direction));
        }