コード例 #1
0
        protected override void OnBindingContextChanged()
        {
            base.OnBindingContextChanged();

            messageLabel.Text = Message;

            if (ShowReloadButton)
            {
                Button button = new Button
                {
                    Text              = ReloadButtonText,
                    BackgroundColor   = (Color)HelperFunctions.GetResourceValue("Primary_Color"),
                    TextColor         = Color.White,
                    HorizontalOptions = LayoutOptions.Center,
                    Margin            = new Thickness(0, 15, 0, 0),
                    Padding           = 0,
                    CornerRadius      = 6,
                    HeightRequest     = 45
                };

                button.Clicked += (sender, e) => ReloadClicked?.Invoke(button, null);
                this.Children.Add(button);
            }
        }
コード例 #2
0
 private void reloadButton_Click(object sender, RoutedEventArgs e)
 {
     ReloadClicked?.Invoke(this, new RoutedEventArgs());
 }