/// <summary> /// Return default Slider style /// </summary> internal protected override ViewStyle GetViewStyle() { SliderStyle style = new SliderStyle { Size = new Size(200, 50), TrackThickness = 5, Track = new ImageViewStyle { BackgroundColor = new Color(0, 0, 0, 0.1f), }, Progress = new ImageViewStyle { BackgroundColor = new Color(0.05f, 0.63f, 0.9f, 1), }, Thumb = new ImageViewStyle { Size = new Size(50, 50), ResourceUrl = DefaultStyle.GetResourcePath("nui_component_default_slider_thumb_n.png"), BackgroundImage = new Selector <string> { Normal = "", Pressed = DefaultStyle.GetResourcePath("nui_component_default_slider_thumb_bg_p.png"), } }, }; return(style); }
/// <summary> /// Return default CheckBox style /// </summary> internal protected override ViewStyle GetAttributes() { ButtonStyle style = new ButtonStyle { Size = new Size(30, 30), Icon = new ImageViewStyle { WidthResizePolicy = ResizePolicyType.DimensionDependency, HeightResizePolicy = ResizePolicyType.SizeRelativeToParent, SizeModeFactor = new Vector3(1, 1, 1), Opacity = new Selector <float?> { Normal = 1.0f, Selected = 1.0f, Disabled = 0.4f, DisabledSelected = 0.4f }, BackgroundImage = new Selector <string> { Normal = DefaultStyle.GetResourcePath("nui_component_default_checkbox_bg_n.png"), Pressed = DefaultStyle.GetResourcePath("nui_component_default_checkbox_bg_p.png"), Selected = DefaultStyle.GetResourcePath("nui_component_default_checkbox_bg_p.png"), Disabled = DefaultStyle.GetResourcePath("nui_component_default_checkbox_bg_n.png"), DisabledSelected = DefaultStyle.GetResourcePath("nui_component_default_checkbox_bg_p.png"), }, ResourceUrl = new Selector <string> { Normal = "", Pressed = "", Selected = DefaultStyle.GetResourcePath("nui_component_default_checkbox_s.png"), Disabled = "", DisabledSelected = DefaultStyle.GetResourcePath("nui_component_default_checkbox_s.png"), } }, Text = new TextLabelStyle { PointSize = new Selector <float?> { All = DefaultStyle.PointSizeNormal }, WidthResizePolicy = ResizePolicyType.FillToParent, HeightResizePolicy = ResizePolicyType.FillToParent, HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Center, TextColor = new Selector <Color> { Normal = new Color(0.22f, 0.22f, 0.22f, 1), Pressed = new Color(0.11f, 0.11f, 0.11f, 1), Disabled = new Color(0.66f, 0.66f, 0.66f, 1) } } }; return(style); }
/// <summary> /// Return default DropDown style /// </summary> internal protected override ViewStyle GetViewStyle() { DropDownStyle style = new DropDownStyle { Position = new Position(50, 50), // WidthResizePolicy = ResizePolicyType.FitToChildren, // HeightResizePolicy = ResizePolicyType.FitToChildren, // HeaderText = new TextLabelStyle // { // Text = new Selector<string> { All = "TitleArea" }, // PointSize = new Selector<float?> { All = 28 }, // TextColor = new Selector<Color> { All = new Color(0, 0, 0, 1) }, // FontFamily = "SamsungOneUI 500C", // }, // BackgroundColor = new Selector<Color> { All = new Color(1, 1, 1, 1) }, Button = new ButtonStyle { ParentOrigin = ParentOrigin.TopLeft, PivotPoint = PivotPoint.TopLeft, BackgroundImage = new Selector <string> { Normal = DefaultStyle.GetResourcePath("nui_component_default_checkbox_bg_n.png"), Pressed = DefaultStyle.GetResourcePath("nui_component_default_checkbox_bg_p.png") }, BackgroundImageBorder = (Rectangle)6, Text = new TextLabelStyle { Text = "Select an item", PointSize = DefaultStyle.PointSizeNormal, TextColor = Color.Black, }, Icon = new ImageViewStyle { Size = new Size(28, 28), ResourceUrl = DefaultStyle.GetResourcePath("nui_component_default_dropdown_button_icon.png"), }, IconRelativeOrientation = Button.IconOrientation.Right, IconPadding = 6, }, ListBackgroundImage = new ImageViewStyle { ResourceUrl = DefaultStyle.GetResourcePath("nui_component_default_dropdown_list_bg.png"), Border = (Rectangle)6, Size = new Size(280, 360), }, SpaceBetweenButtonTextAndIcon = 10, ListPadding = 5, }; return(style); }
/// <summary> /// Return default Switch style /// </summary> internal protected override ViewStyle GetViewStyle() { SwitchStyle style = new SwitchStyle { Size = new Size(96, 60), Track = new ImageViewStyle { ResourceUrl = new Selector <string> { Normal = DefaultStyle.GetResourcePath("nui_component_default_switch_track_n.png"), Selected = DefaultStyle.GetResourcePath("nui_component_default_switch_track_s.png"), Disabled = DefaultStyle.GetResourcePath("nui_component_default_switch_track_d.png"), DisabledSelected = DefaultStyle.GetResourcePath("nui_component_default_switch_track_ds.png"), } }, Thumb = new ImageViewStyle { WidthResizePolicy = ResizePolicyType.DimensionDependency, HeightResizePolicy = ResizePolicyType.SizeRelativeToParent, SizeModeFactor = new Vector3(1, 1, 1), ResourceUrl = new Selector <string> { Normal = DefaultStyle.GetResourcePath("nui_component_default_switch_thumb_n.png"), Selected = DefaultStyle.GetResourcePath("nui_component_default_switch_thumb_n.png"), Disabled = DefaultStyle.GetResourcePath("nui_component_default_switch_thumb_d.png"), DisabledSelected = DefaultStyle.GetResourcePath("nui_component_default_switch_thumb_d.png"), }, }, Text = new TextLabelStyle { PointSize = new Selector <float?> { All = DefaultStyle.PointSizeNormal }, WidthResizePolicy = ResizePolicyType.FillToParent, HeightResizePolicy = ResizePolicyType.FillToParent, HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Center, TextColor = new Selector <Color> { Normal = new Color(0.22f, 0.22f, 0.22f, 1), Pressed = new Color(0.11f, 0.11f, 0.11f, 1), Disabled = new Color(0.66f, 0.66f, 0.66f, 1) } }, }; return(style); }
/// <summary> /// Return default Popup style /// </summary> internal protected override ViewStyle GetAttributes() { PopupStyle style = new PopupStyle { Size = new Size(500, 280), BackgroundColor = new Color(0.9f, 0.9f, 0.9f, 1), ImageShadow = new ImageShadow { Url = DefaultStyle.GetResourcePath("nui_component_default_popup_shadow.png"), Border = new Rectangle(24, 24, 24, 24), Offset = new Vector2(-24, -24), Extents = new Vector2(48, 48), }, Title = new TextLabelStyle { PointSize = 16, TextColor = Color.Black, PositionUsesPivotPoint = true, ParentOrigin = Tizen.NUI.ParentOrigin.TopLeft, PivotPoint = Tizen.NUI.PivotPoint.TopLeft, HorizontalAlignment = HorizontalAlignment.Begin, VerticalAlignment = VerticalAlignment.Bottom, Padding = 20, Text = "Title", }, Buttons = new ButtonStyle { Size = new Size(0, 80), PositionUsesPivotPoint = true, ParentOrigin = Tizen.NUI.ParentOrigin.BottomLeft, PivotPoint = Tizen.NUI.PivotPoint.BottomLeft, BackgroundColor = new Selector <Color> { Normal = new Color(1, 1, 1, 1), Pressed = new Color(1, 1, 1, 0.5f), }, Overlay = new ImageViewStyle { PositionUsesPivotPoint = true, ParentOrigin = Tizen.NUI.ParentOrigin.Center, PivotPoint = Tizen.NUI.PivotPoint.Center, WidthResizePolicy = ResizePolicyType.FillToParent, HeightResizePolicy = ResizePolicyType.FillToParent, BackgroundColor = new Selector <Color> { Normal = new Color(1.0f, 1.0f, 1.0f, 1.0f), Pressed = new Color(0.0f, 0.0f, 0.0f, 0.1f), Selected = new Color(1.0f, 1.0f, 1.0f, 1.0f), } }, Text = new TextLabelStyle { PositionUsesPivotPoint = true, ParentOrigin = Tizen.NUI.ParentOrigin.Center, PivotPoint = Tizen.NUI.PivotPoint.Center, HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Center, TextColor = new Color(0.05f, 0.63f, 0.9f, 1) }, }, }; return(style); }