void UpdateDrawerState(bool isOpen) { double endState = isOpen ? 1 : 0; var animation = new Animation((r) => { OpenRatio = r; InvalidateLayout(); }, OpenRatio, endState, Easing.SinIn); animation.Commit(this, "DrawerOpen", length: (uint)(250 * Math.Abs(endState - OpenRatio)), finished: (f, aborted) => { if (!aborted) { if (isOpen) { DrawerOpened?.Invoke(this, EventArgs.Empty); } else { DrawerClosed?.Invoke(this, EventArgs.Empty); } } }); }
public override void OnDrawerOpened(View drawerView) { DrawerOpened?.Invoke(this, new ActionBarDrawerEventArgs(drawerView)); base.OnDrawerOpened(drawerView); }