protected void HandelAction(int position, XMRecyclerViewAction action, XMViewCardAction viewCardAction) { switch (action) { case XMRecyclerViewAction.Selection: ItemClick?.Invoke(this, new XMItemClickEventArgs <T>(position, DataSource[position])); break; case XMRecyclerViewAction.CardViewAction: var args = new XMViewCardActionEventArgs <T>(position, viewCardAction, DataSource[position]); HandleViewCardAction(args); OnViewCardActionHandled?.Invoke(this, args); break; } }
/// <summary> /// Handles any <see cref="XMViewCardAction"/> defined for the current ViewCard. /// </summary> /// <param name="e"></param> protected abstract void HandleViewCardAction(XMViewCardActionEventArgs <T> e);