示例#1
0
 protected override DropDownStyle GetDropDownStyle()
 {
     return(new DropDownStyle
     {
         Position = new Position(50, 50),
         Button = new ButtonStyle
         {
             ParentOrigin = ParentOrigin.TopLeft,
             PivotPoint = PivotPoint.TopLeft,
             BackgroundImage = new Selector <string>
             {
                 Normal = StyleManager.GetFrameworkResourcePath("nui_component_default_checkbox_bg_n.png"),
                 Pressed = StyleManager.GetFrameworkResourcePath("nui_component_default_checkbox_bg_p.png")
             },
             BackgroundImageBorder = (Rectangle)6,
             Text = new TextLabelStyle
             {
                 Text = "Select an item",
                 PointSize = StyleManager.PointSizeNormal,
                 TextColor = Color.Black,
             },
             Icon = new ImageViewStyle
             {
                 Size = new Size(28, 28),
                 ResourceUrl = StyleManager.GetFrameworkResourcePath("nui_component_default_dropdown_button_icon.png"),
             },
             IconRelativeOrientation = Button.IconOrientation.Right,
             IconPadding = 6,
         },
         ListBackgroundImage = new ImageViewStyle
         {
             ResourceUrl = StyleManager.GetFrameworkResourcePath("nui_component_default_dropdown_list_bg.png"),
             Border = (Rectangle)6,
             Size = new Size(280, 360),
         },
         SpaceBetweenButtonTextAndIcon = 10,
         ListPadding = 5,
     });
 }
示例#2
0
 protected override PopupStyle GetPopupStyle()
 {
     return(new PopupStyle
     {
         Size = new Size(500, 280),
         BackgroundColor = new Color(0.9f, 0.9f, 0.9f, 1),
         ImageShadow = new ImageShadow
         {
             Url = StyleManager.GetFrameworkResourcePath("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)
             },
         },
     });
 }