public RatingBarView() { InitializeComponent(); var close = new TapGestureRecognizer(); close.Tapped += async(s, e) => { DialogNotifier.Cancel(); }; switch (Device.RuntimePlatform) { case Device.iOS: RatingBar.Margin = new Thickness(0, 0, 0, 0); RatingBar.FillColor = (Color)Application.Current.Resources["MainColor"]; RatingBar.HeightRequest = 35; break; case Device.Android: break; default: break; } IconViewClose.GestureRecognizers.Add(close); }
protected override void OnApplyTemplate() { base.OnApplyTemplate(); if (GetTemplateChild("CloseButton") is Button b) { b.Clicked += (_, __) => DialogNotifier.Cancel(); } }
void Handle_Cancel_Clicked(object sender, System.EventArgs e) { DialogNotifier.Cancel(); }
void Cancel_Clicked(System.Object sender, System.EventArgs e) { DialogNotifier.Cancel(); }
private void CancelAndClose_Tapped(object sender, EventArgs e) { DialogNotifier.Cancel(); }
async void CloseDialog(object sender, EventArgs args) { DialogNotifier.Cancel(); }
private void SettingsButton_Clicked(object sender, EventArgs e) { DialogNotifier.Cancel(); }
void Handle_Cancel_Clicked(object sender, System.EventArgs e) { // send cancel notification to the dialog. DialogNotifier.Cancel(); }
private void CloseButton_Clicked(object sender, EventArgs e) => DialogNotifier.Cancel();
public void CloseDialog() { DialogNotifier.Cancel(); }