btn.Name = position.ToString();\r
btn.PointSize = ManualTest.GetPointSize();\r
btn.Size = new Size(Window.Instance.Size.Width, Window.Instance.Size.Height * 0.046f);
- btn.Style.Text.TextColor = new Color(0, 0, 0, 1);\r
- btn.Style.ImageShadow = new ImageShadow\r
- {
- Url = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/rectangle_btn_shadow.png",
- Border = new Rectangle(5, 5, 5, 5)
- };
- btn.Style.BackgroundImage = new Selector<string>\r
+ btn.TextColor = new Color(0, 0, 0, 1);\r
+ btn.ImageShadow = new ImageShadow\r
{\r
- Focused = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/rectangle_point_btn_normal.png",\r
- Other = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/rectangle_toggle_btn_normal.png"\r
+ Url = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/rectangle_btn_shadow.png",\r
+ Border = new Rectangle(5, 5, 5, 5)\r
};\r
+ btn.BackgroundImage = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/rectangle_toggle_btn_normal.png";\r
+ btn.BackgroundImageBorder = new Rectangle(5, 5, 5, 5);\r
btn.FocusGained += (obj, e) =>\r
{
- btn.Style.BackgroundImage = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/rectangle_point_btn_normal.png";
+ btn.BackgroundImage = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/rectangle_point_btn_normal.png";
};\r
btn.FocusLost += (obj, e) =>
{
- btn.Style.BackgroundImage = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/rectangle_toggle_btn_normal.png";\r
- };
- btn.Style.BackgroundImageBorder = new Rectangle(5, 5, 5, 5);\r
+ btn.BackgroundImage = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/rectangle_toggle_btn_normal.png";\r
+ };\r
btn.ParentOrigin = Position.ParentOriginTopLeft;
btn.PivotPoint = PivotPoint.TopLeft;
btn.TextAlignment = HorizontalAlignment.Begin;
btn.PointSize = _pointSize;\r
float buttonWidth = ManualTest.IsMobile() ? Window.Instance.Size.Width * 0.18f : Window.Instance.Size.Width * 0.06f;\r
btn.Size = new Size(buttonWidth, Window.Instance.Size.Height * 0.046f);\r
- btn.Style.Text.TextColor = new Color(0, 0, 0, 1);\r
- btn.Style.ImageShadow = new ImageShadow
+ btn.TextColor = new Color(0, 0, 0, 1);\r
+ btn.ImageShadow = new ImageShadow
{\r
Url = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/rectangle_btn_shadow.png",\r
Border = new Rectangle(5, 5, 5, 5)\r
};\r
- btn.Style.BackgroundImage = new Selector<string>
- {
- Focused = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/rectangle_point_btn_normal.png",
- Other = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/rectangle_toggle_btn_normal.png"\r
- };
- btn.Style.BackgroundImageBorder = new Rectangle(5, 5, 5, 5);\r
+ btn.BackgroundImage = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/rectangle_toggle_btn_normal.png";
+ btn.BackgroundImageBorder = new Rectangle(5, 5, 5, 5);\r
btn.ParentOrigin = Position.ParentOriginTopLeft;\r
btn.PivotPoint = PivotPoint.TopLeft;
btn.FocusGained += (obj, e) =>
{
- btn.Style.BackgroundImage = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/rectangle_point_btn_normal.png";
+ btn.BackgroundImage = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/rectangle_point_btn_normal.png";
};
btn.FocusLost += (obj, e) =>
{
- btn.Style.BackgroundImage = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/rectangle_toggle_btn_normal.png";
+ btn.BackgroundImage = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/rectangle_toggle_btn_normal.png";
};
}
btn.Text = text;\r
btn.PointSize = 4.0f;\r
btn.TextAlignment = HorizontalAlignment.Begin;\r
- btn.Style.Text.TextColor = Color.White;\r
- btn.Style.BackgroundImage = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/controller_btn_check_on.png";\r
- btn.Style.BackgroundImageBorder = new Rectangle(5, 5, 5, 5);\r
+ btn.TextColor = Color.White;\r
+ btn.BackgroundImage = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/controller_btn_check_on.png";\r
+ btn.BackgroundImageBorder = new Rectangle(5, 5, 5, 5);\r
}
}
if (!btn) return;
btn.Text = text;
btn.PointSize = 4.0f;
- btn.Style.Text.TextColor = new Selector<Color>
- {
- Normal = new Color(0, 0, 0, 1),
- Pressed = new Color(0, 0, 0, 0.7f),
- Selected = new Color(0.058f, 0.631f, 0.92f, 1),
- Disabled = new Color(0, 0, 0, 0.4f)
- };
- btn.Style.BackgroundImage = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/controller_btn_check_on.png";
- btn.Style.BackgroundImageBorder = new Rectangle(5, 5, 5, 5);
+ btn.TextColor = new Color(0, 0, 0, 1);
+ btn.BackgroundImage = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/controller_btn_check_on.png";
+ btn.BackgroundImageBorder = new Rectangle(5, 5, 5, 5);
btn.TextColor = Color.White;
}
private void CreatePopup()
{
- _popup = new Popup();
+ _popup = new Popup(new PopupStyle());
Assert.IsNotNull(_popup, "Should be not null");
Assert.IsInstanceOf<Components.Popup>(_popup, "Should be equal!");\r
_popup.Size = new Size(Window.Instance.Size.Width * 0.2f, Window.Instance.Size.Height * 0.24f);\r
_popup.Position = new Position(Window.Instance.Size.Width * 0.39f, Window.Instance.Size.Height * 0.2f);\r
\r
// Title\r
- _popup.Style.Title.PointSize = _pointSize;\r
- _popup.Style.Title.SizeHeight = Window.Instance.Size.Height * 0.025f;\r
- _popup.Style.Title.HorizontalAlignment = HorizontalAlignment.Begin;\r
- _popup.Style.Title.Position = new Position(Window.Instance.Size.Width * 0.033f, Window.Instance.Size.Height * 0.01f);\r
- _popup.Style.Title.Text = "Popup Title";\r
- _popup.Style.Title.Padding = new Extents(0, 0, 0, 0);\r
+ _popup.TitlePointSize = _pointSize;\r
+ _popup.TitleHeight = (int)(Window.Instance.Size.Height * 0.025f);\r
+ _popup.TitleTextHorizontalAlignment = HorizontalAlignment.Begin;\r
+ _popup.TitleTextPosition = new Position(Window.Instance.Size.Width * 0.033f, Window.Instance.Size.Height * 0.01f);\r
+ _popup.TitleText = "Popup Title";\r
\r
// Background\r
_popup.BackgroundImage = _resourcePath + "/images/popup_background.png";\r
}
private void CreateSwitch()
- {
- _switch = new Switch(new SwitchStyle());
+ {\r
+ SwitchStyle st = new SwitchStyle\r
+ {\r
+ Track = new ImageViewStyle\r
+ {\r
+ ResourceUrl = new Selector<string>\r
+ {\r
+ Normal = _resourcePath + "/images/controller_switch_bg_off.png",\r
+ Selected = _resourcePath + "/images/controller_switch_bg_on.png",\r
+ }\r
+ },\r
+ Thumb = new ImageViewStyle\r
+ {\r
+ Size = new Size(Window.Instance.Size.Width * 0.0312f, Window.Instance.Size.Height * 0.0555f),\r
+ ResourceUrl = new Selector<string>\r
+ {\r
+ Normal = _resourcePath + "/images/controller_switch_handler.png",\r
+ Selected = _resourcePath + "/images/controller_switch_handler.png",\r
+ },\r
+ },\r
+ };
+ _switch = new Switch(st);
Assert.IsNotNull(_switch, "Should be not null");
Assert.IsInstanceOf<Components.Switch>(_switch, "Should be equal!");
_switch.Size = new Size(Window.Instance.Size.Width * 0.05f, Window.Instance.Size.Height * 0.0555f);
- _switch.Position = new Position(Window.Instance.Size.Width * 0.5f, Window.Instance.Size.Height * 0.5f);
- _switch.Style.Thumb.Size = new Size(Window.Instance.Size.Width * 0.0312f, Window.Instance.Size.Height * 0.0555f);
- _switch.Style.Track.ResourceUrl = new Selector<string>
- {
- Normal = _resourcePath + "/images/controller_switch_bg_off.png",
- Selected = _resourcePath + "/images/controller_switch_bg_on.png",
- };
- _switch.Style.Thumb.ResourceUrl = new Selector<string>
- {
- Normal = _resourcePath + "/images/controller_switch_handler.png",
- Selected = _resourcePath + "/images/controller_switch_handler.png",
- };\r
-\r
+ _switch.Position = new Position(Window.Instance.Size.Width * 0.5f, Window.Instance.Size.Height * 0.5f);\r
if (ManualTest.IsWearable())
{\r
_wearTestPage.ExecuteTC(_switch);\r
btn.Name = position.ToString();
btn.PointSize = ManualTest.GetPointSize();
btn.Size = new Size(Window.Instance.Size.Width, Window.Instance.Size.Height * 0.046f);
- btn.Style.Text.TextColor = new Color(0, 0, 0, 1);
- btn.Style.ImageShadow = new ImageShadow
+ btn.TextColor = new Color(0, 0, 0, 1);
+ btn.ImageShadow = new ImageShadow
{
Url = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/rectangle_btn_shadow.png",
Border = new Rectangle(5, 5, 5, 5)
};
- btn.Style.BackgroundImage = new Selector<string>
- {
- Focused = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/rectangle_point_btn_normal.png",
- Other = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/rectangle_toggle_btn_normal.png"
- };
+ btn.BackgroundImage = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/rectangle_toggle_btn_normal.png";
+ btn.BackgroundImageBorder = new Rectangle(5, 5, 5, 5);
btn.FocusGained += (obj, e) =>
{
- btn.Style.BackgroundImage = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/rectangle_point_btn_normal.png";
+ btn.BackgroundImage = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/rectangle_point_btn_normal.png";
};
btn.FocusLost += (obj, e) =>
{
- btn.Style.BackgroundImage = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/rectangle_toggle_btn_normal.png";
+ btn.BackgroundImage = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/rectangle_toggle_btn_normal.png";
};
- btn.Style.BackgroundImageBorder = new Rectangle(5, 5, 5, 5);
btn.ParentOrigin = Position.ParentOriginTopLeft;
btn.PivotPoint = PivotPoint.TopLeft;
btn.TextAlignment = HorizontalAlignment.Begin;
btn.PointSize = _pointSize;
float buttonWidth = ManualTest.IsMobile() ? Window.Instance.Size.Width * 0.18f : Window.Instance.Size.Width * 0.06f;
btn.Size = new Size(buttonWidth, Window.Instance.Size.Height * 0.046f);
- btn.Style.Text.TextColor = new Color(0, 0, 0, 1);
- btn.Style.ImageShadow = new ImageShadow
+ btn.TextColor = new Color(0, 0, 0, 1);
+ btn.ImageShadow = new ImageShadow
{
Url = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/rectangle_btn_shadow.png",
Border = new Rectangle(5, 5, 5, 5)
};
- btn.Style.BackgroundImage = new Selector<string>
- {
- Focused = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/rectangle_point_btn_normal.png",
- Other = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/rectangle_toggle_btn_normal.png"
- };
- btn.Style.BackgroundImageBorder = new Rectangle(5, 5, 5, 5);
+ btn.BackgroundImage = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/rectangle_toggle_btn_normal.png";
+ btn.BackgroundImageBorder = new Rectangle(5, 5, 5, 5);
btn.ParentOrigin = Position.ParentOriginTopLeft;
btn.PivotPoint = PivotPoint.TopLeft;
btn.FocusGained += (obj, e) =>
{
- btn.Style.BackgroundImage = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/rectangle_point_btn_normal.png";
+ btn.BackgroundImage = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/rectangle_point_btn_normal.png";
};
btn.FocusLost += (obj, e) =>
{
- btn.Style.BackgroundImage = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/rectangle_toggle_btn_normal.png";
+ btn.BackgroundImage = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/rectangle_toggle_btn_normal.png";
};
}
btn.Text = text;\r
btn.PointSize = 4.0f;\r
btn.TextAlignment = HorizontalAlignment.Begin;\r
- btn.Style.Text.TextColor = Color.White;\r
- btn.Style.BackgroundImage = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/controller_btn_check_on.png";\r
- btn.Style.BackgroundImageBorder = new Rectangle(5, 5, 5, 5);\r
+ btn.TextColor = Color.White;\r
+ btn.BackgroundImage = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/controller_btn_check_on.png";\r
+ btn.BackgroundImageBorder = new Rectangle(5, 5, 5, 5);\r
}
}
if (!btn) return;
btn.Text = text;
btn.PointSize = 4.0f;
- btn.Style.Text.TextColor = new Selector<Color>
- {
- Normal = new Color(0, 0, 0, 1),
- Pressed = new Color(0, 0, 0, 0.7f),
- Selected = new Color(0.058f, 0.631f, 0.92f, 1),
- Disabled = new Color(0, 0, 0, 0.4f)
- };
- btn.Style.BackgroundImage = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/controller_btn_check_on.png";
- btn.Style.BackgroundImageBorder = new Rectangle(5, 5, 5, 5);
+ btn.TextColor = new Color(0, 0, 0, 1);
+ btn.BackgroundImage = Tizen.Applications.Application.Current.DirectoryInfo.Resource + "/images/controller_btn_check_on.png";
+ btn.BackgroundImageBorder = new Rectangle(5, 5, 5, 5);
btn.TextColor = Color.White;
}