ui/wpf/UIcore/Controls.cs

changeset 104
3efe0210e27e
parent 101
1c943d43fa81
child 135
b9dc9cdfa23a
equal deleted inserted replaced
103:6a6718269c22 104:3efe0210e27e
32 public static Label Space(Container container) 32 public static Label Space(Container container)
33 { 33 {
34 return Application.GetInstance().Exec<Label>(() => Controls.CreateLabel(container, null, HorizontalAlignment.Center)); 34 return Application.GetInstance().Exec<Label>(() => Controls.CreateLabel(container, null, HorizontalAlignment.Center));
35 } 35 }
36 36
37 public static Separator Separator(Container container)
38 {
39 return Application.GetInstance().Exec<Separator>(() => Controls.CreateSeparator(container));
40 }
41
37 public static Button CreateButton(Container container, String label, RoutedEventHandler e) 42 public static Button CreateButton(Container container, String label, RoutedEventHandler e)
38 { 43 {
39 Button button = new Button(); 44 Button button = new Button();
40 button.Content = label; 45 button.Content = label;
41 container.Add(button, false); 46 container.Add(button, false);
52 label.Content = str; 57 label.Content = str;
53 container.Add(label, false); 58 container.Add(label, false);
54 59
55 return label; 60 return label;
56 } 61 }
62
63 public static Separator CreateSeparator(Container container)
64 {
65 Separator separator = new Separator();
66 container.Add(separator, false);
67 return separator;
68 }
57 } 69 }
58 } 70 }

mercurial