--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/wpf/UIcore/Controls.cs Sat Jan 31 11:51:54 2015 +0100 @@ -0,0 +1,32 @@ +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; + } + + + } +}