コード例 #1
0
 private void MainWindow_Loaded(object sender, RoutedEventArgs e)
 {
     AlertBarManager.Alert("Default",
                           AlertBuilder.Build()
                           .WithTitle("TestTitle")
                           .WithMessage("Hello")
                           .WithAction("Klick mich", () => MessageBox.Show("Hier ist die Antwort: 42"), true)
                           //.AsStickyInfo()
                           .WithBackground(Colors.Pink));
 }
コード例 #2
0
        public override IDisposable Alert(AlertConfig config)
        {
            var activity = this.TopActivityFunc();

            if (activity is AppCompatActivity)
            {
                return(this.ShowDialog <AlertAppCompatDialogFragment, AlertConfig>((AppCompatActivity)activity, config));
            }

            if (activity is FragmentActivity)
            {
                return(this.ShowDialog <AlertDialogFragment, AlertConfig>((FragmentActivity)activity, config));
            }

            return(this.Show(activity, AlertBuilder.Build(activity, config)));
        }
コード例 #3
0
 protected override Dialog CreateDialog(AlertConfig config)
 {
     return(AlertBuilder.Build(this.Activity as AppCompatActivity, config).Create());
 }