{
Log.Fatal("TCT", "[TestCase][OnPreCreate][NUIWatchApplication] Pass");
base.OnPreCreate();
+ }\r
+\r
+ private PropertyMap CreateTextVisual(string text, Color color)
+ {
+ PropertyMap map = new PropertyMap();
+ map.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Text));
+ map.Add(TextVisualProperty.Text, new PropertyValue(text));
+ map.Add(TextVisualProperty.TextColor, new PropertyValue(color));
+ map.Add(TextVisualProperty.PointSize, new PropertyValue(6.0f));
+ map.Add(TextVisualProperty.HorizontalAlignment, new PropertyValue("CENTER"));
+ map.Add(TextVisualProperty.VerticalAlignment, new PropertyValue("BOTTOM"));
+ return map;
}
protected override void OnCreate()
{
_win.BackgroundColor = Color.White;
PushButton exitButton = new PushButton();
- exitButton.LabelText = "EXIT";
- exitButton.Size2D = new Size2D(200, 80);
- exitButton.Position2D = new Position2D(80, 120);
+ exitButton.Label = CreateTextVisual("Exit", Color.White);
+ exitButton.Size2D = new Size2D(120, 60);
+ exitButton.Position2D = new Position2D(-150, -150);
exitButton.Clicked += (obj, e) =>
{