public PreviewView(string title, object item) { BindingContext = item; Item = item; _titleLabel.Text = title; _moreButton.ButtonLabel.Style = _labelStyle; _moreButton.OnTabAnimation = new Animation(d => { _moreButton.TranslationX = d * 100; }, 0, 1); _moreButton.AnimationCallback = (d, b) => { _moreButton.TranslationX = 0; }; _closeButton.ButtonLabel.Style = _labelStyle; _closeButton.OnTabAnimation = null; // add events _closeButton.ButtonTapped += CloseButtonOnButtonTapped; _moreButton.ButtonTapped += (sender, args) => MoreEvent?.Invoke(null, EventArgs.Empty); Grid mainGrid = CreateInputRows(); base.Content = mainGrid; }
remove => RemoveHandler(MoreEvent, value);
add => AddHandler(MoreEvent, value);