Exemple #1
0
        static void HandleButtonButtonAction(object sender, TouchEventArgs e)
        {
            //if (e.TouchEvent == TouchEventType.Down)
            {
                var dialog = new Dialog();
                Label label = new Label();
                label.X = 10.0f;
                label.Y = 50.0f;
                label.Text = "Test Dialog";

                Button button = new Button();
                button.Text = "Hidding Dialog...";
                button.TextColor = new UIColor(1.0f, 0.0f, 0.0f, 1.0f);
                button.SetPosition(5.0f, 5.0f);

                button.ButtonAction += (s, ea) =>
                {
                    dialog.Hide();
                };

                dialog.AddChildLast(button);
                dialog.AddChildLast(label);

                dialog.Show();
            }
        }