ui/wpf/UIcore/Controls.cs

Tue, 12 Jan 2016 17:41:08 +0100

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Tue, 12 Jan 2016 17:41:08 +0100
changeset 99
ea1a2d5de765
parent 83
a38aec91bd66
child 101
1c943d43fa81
permissions
-rw-r--r--

improved grid container (Gtk)

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;

namespace UI
{  
    public class Controls
    {

        public static Button Button(Container container, String label, RoutedEventHandler e)
        {
            return Application.GetInstance().Exec<Button>(() => Controls.CreateButton(container, label, e));
        }

        public static Button CreateButton(Container container, String label, RoutedEventHandler e)
        {
            Button button = new Button();
            button.Content = label;
            container.Add(button, false);

            button.Click += e;

            return button;
        }


    }
}

mercurial