public static async Task Show(IDrawerContent childView, double pRange = 315.0, bool isTapDismiss = false, Mode mode = Mode.Right) { TryCloseCurrent(); MDrawer _view = new MDrawer(mode) { Content = childView, PRange = pRange, _isTapDismiss = isTapDismiss }; childView.Drawer = _view; _current = _view; await AwaitableContainer.Show(_view, false); if (childView is FrameworkElement) { (childView as FrameworkElement).DataContext = null; } if (_current == _view) { _current = null; } _view.Content = null; childView.Drawer = null; }
public static Task ShowAuto(IDrawerContent childView, bool isTapDismiss = false, Mode mode = Mode.Right) { return(Show(childView, double.NaN, isTapDismiss, mode)); }