private void Popup0ButtonClickedEvent(object sender, Popup.ButtonClickEventArgs e) { Popup obj = sender as Popup; if (obj != null) { popup0.Dismiss(); } }
private void Popup1ButtonClickedEvent(object sender, Popup.ButtonClickEventArgs e) { Popup obj = sender as Popup; if (obj != null) { popup0.ContentView.Add(new TextLabel("Popup1: " + (e.ButtonIndex == 0 ? "Left" : "Right")) { // Position = new Position(0, 60), HorizontalAlignment = HorizontalAlignment.Center, TextColor = Color.Magenta, }); popup1.Dismiss(); } }
private void PopupButtonClickedEvent(object sender, Popup.ButtonClickEventArgs e) { if (e.ButtonIndex == 1) { (sender as Popup)?.Dismiss(); } else { clickCount = (clickCount + 1) % 2; if (clickCount == 0) { ThemeManager.ApplyTheme(theme1); } else if (clickCount == 1) { ThemeManager.ApplyTheme(theme2); } } }
private void PopupButtonClickedEvent(object sender, Popup.ButtonClickEventArgs e) { Popup obj = sender as Popup; if (obj != null && e.ButtonIndex == 0) { if (obj == popup) { index++; index = index % buttonStyles.Length; obj.ButtonTextColor = color[index]; contentText.Text = "Popup ButtonStyle is " + buttonStyles[index]; } else { index2++; index2 = index2 % buttonStyles.Length; obj.ButtonTextColor = color[index2]; contentText2.Text = "Popup2 ButtonStyle is " + buttonStyles[index2]; } } }