Esempio n. 1
0
        public Theme Create(IEnumerable <KeyValuePair <string, string> > changedResources)
        {
            var theme = new Theme()
            {
                Id = "Tizen.NUI.Theme.Common"
            };

            theme.SetChangedResources(changedResources);
            theme.Resources = CreateThemeResource();
            theme.OnThemeResourcesChanged();

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Button", new ButtonStyle()
            {
                Size            = new Size(100, 45),
                BackgroundColor = new Selector <Color>()
                {
                    Normal   = (Color)theme.Resources["ButtonBackgroundColorNormal"],
                    Pressed  = (Color)theme.Resources["ButtonBackgroundColorPressed"],
                    Disabled = (Color)theme.Resources["ButtonBackgroundColorDisabled"],
                },
                Text = new TextLabelStyle()
                {
                    PointSize = 12,
                    TextColor = new Selector <Color>()
                    {
                        Normal   = (Color)theme.Resources["ButtonTextColorNormal"],
                        Pressed  = (Color)theme.Resources["ButtonTextColorPressed"],
                        Disabled = (Color)theme.Resources["ButtonTextColorDisabled"],
                    }
                }
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.CheckBox", new ButtonStyle()
            {
                Size = new Size(30, 30),
                Icon = new ImageViewStyle()
                {
                    Opacity = new Selector <float?>()
                    {
                        Normal   = 1.0f,
                        Disabled = 0.4f,
                        Selected = 1.0f,
                    },
                    BackgroundImage = new Selector <string>()
                    {
                        Pressed  = (string)theme.Resources["CheckBoxIconBackgroundImagePressed"],
                        Selected = (string)theme.Resources["CheckBoxIconBackgroundImageSelected"],
                        Other    = (string)theme.Resources["CheckBoxIconBackgroundImageOther"],
                    },
                    ResourceUrl = new Selector <string>()
                    {
                        Pressed  = (string)theme.Resources["CheckBoxIconImageResourceUrlPressed"],
                        Selected = (string)theme.Resources["CheckBoxIconImageResourceUrlSelected"],
                        Other    = (string)theme.Resources["CheckBoxIconImageResourceUrlOther"],
                    },
                },
                Text = new TextLabelStyle()
                {
                    PointSize = 12,
                    TextColor = new Selector <Color>()
                    {
                        Normal   = (Color)theme.Resources["CheckBoxTextColorNormal"],
                        Pressed  = (Color)theme.Resources["CheckBoxTextColorPressed"],
                        Disabled = (Color)theme.Resources["CheckBoxTextColorDisabled"],
                    }
                }
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Popup", new PopupStyle()
            {
                Size            = new Size(500, 280),
                BackgroundColor = (Color)theme.Resources["PopupBackgroundColor"],
                ImageShadow     = new ImageShadow()
                {
                    Url     = (string)theme.Resources["PopupImageShadowUrl"],
                    Border  = new Rectangle(24, 24, 24, 24),
                    Extents = new Vector2(48, 48)
                },
                Title = new TextLabelStyle()
                {
                    PointSize = 16,
                    Padding   = new Extents(20, 20, 20, 20),
                },
                Buttons = new ButtonStyle()
                {
                    Size            = new Size(0, 80),
                    BackgroundColor = new Selector <Color>()
                    {
                        Normal  = (Color)theme.Resources["PopupButtonBackgroundColorNormal"],
                        Pressed = (Color)theme.Resources["PopupButtonBackgroundColorPressed"],
                    },
                    Overlay = new ImageViewStyle()
                    {
                        BackgroundColor = new Selector <Color>()
                        {
                            Normal  = (Color)theme.Resources["PopupButtonOverlayBackgroundColorNormal"],
                            Pressed = (Color)theme.Resources["PopupButtonOverlayBackgroundColorPressed"],
                            Other   = (Color)theme.Resources["PopupButtonOverlayBackgroundColorSelected"],
                        },
                    },
                    Text = new TextLabelStyle()
                    {
                        TextColor = (Color)theme.Resources["PopupButtonTextColor"],
                    }
                }
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Progress", new ProgressStyle()
            {
                Size  = new Size(200, 5),
                Track = new ImageViewStyle()
                {
                    BackgroundColor = (Color)theme.Resources["ProgressTrackBackgroundColor"],
                },
                Buffer = new ImageViewStyle()
                {
                    BackgroundColor = (Color)theme.Resources["ProgressBufferBackgroundColor"],
                },
                Progress = new ImageViewStyle()
                {
                    BackgroundColor = (Color)theme.Resources["ProgressProgressBackgroundColor"],
                },
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.RadioButton", new ButtonStyle()
            {
                Size = new Size(30, 30),
                Icon = new ImageViewStyle()
                {
                    Opacity = new Selector <float?>()
                    {
                        Normal   = 1.0f,
                        Disabled = 0.4f,
                        Selected = 1.0f,
                    },
                    BackgroundImage = new Selector <string>()
                    {
                        Pressed  = (string)theme.Resources["RadioButtonIconBackgroundImagePressed"],
                        Selected = (string)theme.Resources["RadioButtonIconBackgroundImageSelected"],
                        Other    = (string)theme.Resources["RadioButtonIconBackgroundImageOther"],
                    }
                },
                Text = new TextLabelStyle()
                {
                    PointSize = 12,
                    TextColor = new Selector <Color>()
                    {
                        Normal   = (Color)theme.Resources["RadioButtonTextColorNormal"],
                        Pressed  = (Color)theme.Resources["RadioButtonTextColorPressed"],
                        Disabled = (Color)theme.Resources["RadioButtonTextColorDisabled"],
                    }
                }
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Slider", new SliderStyle()
            {
                Size           = new Size(200, 50),
                TrackThickness = 5,
                Track          = new ImageViewStyle()
                {
                    BackgroundColor = (Color)theme.Resources["SliderTrackColor"],
                },
                Progress = new ImageViewStyle()
                {
                    BackgroundColor = (Color)theme.Resources["SliderProgressColor"],
                },
                Thumb = new ImageViewStyle()
                {
                    Size            = new Size(50, 50),
                    ResourceUrl     = (string)theme.Resources["SliderThumbImageResourceUrl"],
                    BackgroundImage = new Selector <string>()
                    {
                        Normal  = (string)theme.Resources["SliderThumbBackgroundImageNormal"],
                        Pressed = (string)theme.Resources["SliderThumbBackgroundImagePressed"],
                    }
                },
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Switch", new SwitchStyle()
            {
                Size  = new Size(96, 60),
                Track = new ImageViewStyle()
                {
                    Size        = new Size(96, 60),
                    ResourceUrl = new Selector <string>()
                    {
                        Normal           = (string)theme.Resources["SwitchTrackImageResourceUrlNormal"],
                        Selected         = (string)theme.Resources["SwitchTrackImageResourceUrlSelected"],
                        Disabled         = (string)theme.Resources["SwitchTrackImageResourceUrlDisabled"],
                        DisabledSelected = (string)theme.Resources["SwitchTrackImageResourceUrlDisabledSelected"],
                    }
                },
                Thumb = new ImageViewStyle()
                {
                    Size        = new Size(60, 60),
                    ResourceUrl = new Selector <string>()
                    {
                        Normal   = (string)theme.Resources["SwitchThumbImageResourceUrlNormal"],
                        Disabled = (string)theme.Resources["SwitchThumbImageResourceUrlDisabled"],
                        Selected = (string)theme.Resources["SwitchThumbImageResourceUrlSelected"],
                    }
                },
                Text = new TextLabelStyle()
                {
                    PointSize = 12,
                    TextColor = new Selector <Color>()
                    {
                        Normal   = (Color)theme.Resources["SwitchTextColorNormal"],
                        Pressed  = (Color)theme.Resources["SwitchTextColorPressed"],
                        Disabled = (Color)theme.Resources["SwitchTextColorDisabled"],
                    }
                }
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Tab", new TabStyle()
            {
                Size            = new Size(480, 80),
                BackgroundColor = (Color)theme.Resources["TabBackgroundColor"],
                UnderLine       = new ViewStyle()
                {
                    Size            = new Size(0, 6),
                    BackgroundColor = (Color)theme.Resources["TabUnderLineBackgroundColor"],
                },
                Text = new TextLabelStyle()
                {
                    PointSize = 16,
                    TextColor = new Selector <Color>()
                    {
                        Normal   = (Color)theme.Resources["TabTextColorNormal"],
                        Selected = (Color)theme.Resources["TabTextColorSelected"],
                    }
                }
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Toast", new ToastStyle()
            {
                Size            = new Size(480, 80),
                BackgroundColor = (Color)theme.Resources["ToastBackgroundColor"],
                Text            = new TextLabelStyle()
                {
                    Padding = new Extents(12, 12, 8, 8)
                }
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Loading", new LoadingStyle()
            {
                LoadingSize = new Size(100, 100),
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Pagination", new PaginationStyle()
            {
                IndicatorImageUrl = new Selector <string>()
                {
                    Normal   = (string)theme.Resources["PaginationIndicatorImageUrlNormal"],
                    Selected = (string)theme.Resources["PaginationIndicatorImageUrlSelected"],
                }
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Scrollbar", new ScrollbarStyle()
            {
                TrackThickness = 6,
                ThumbThickness = 6,
                TrackColor     = (Color)theme.Resources["ScrollbarTrackColor"],
                ThumbColor     = (Color)theme.Resources["ScrollbarThumbColor"],
                TrackPadding   = 4
            });

            return(theme);
        }
Esempio n. 2
0
        public Theme Create()
        {
            var theme = new Theme()
            {
                Id      = Tizen.NUI.DefaultThemeCreator.DefaultId,
                Version = Tizen.NUI.DefaultThemeCreator.DefaultVersion
            };

            // Button base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.Button", new ButtonStyle()
            {
                Size                    = new Size(339, 96),
                CornerRadius            = 28.0f,
                ItemHorizontalAlignment = HorizontalAlignment.Center,
                ItemVerticalAlignment   = VerticalAlignment.Center,
                BackgroundColor         = new Selector <Color>()
                {
                    Normal   = new Color(0.039f, 0.055f, 0.29f, 1),
                    Pressed  = new Color(0.106f, 0.412f, 0.792f, 1),
                    Focused  = new Color(0, 0.2f, 0.545f, 1),
                    Disabled = new Color(0.765f, 0.792f, 0.824f, 1),
                },
                Text = new TextLabelStyle()
                {
                    TextColor = Color.White,
                    PixelSize = 32,
                }
            });

            // CheckBox base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.CheckBox", new ButtonStyle()
            {
                ItemSpacing             = new Size2D(32, 32),
                ItemHorizontalAlignment = HorizontalAlignment.Begin,
                ItemVerticalAlignment   = VerticalAlignment.Center,
                Icon = new ImageViewStyle()
                {
                    Size        = new Size(36, 36),
                    ResourceUrl = new Selector <string>()
                    {
                        Normal           = FrameworkInformation.ResourcePath + "IoT_check_off.png",
                        Pressed          = FrameworkInformation.ResourcePath + "IoT_check_off_p.png",
                        Disabled         = FrameworkInformation.ResourcePath + "IoT_check_off_d.png",
                        Focused          = FrameworkInformation.ResourcePath + "IoT_check_off_f.png",
                        Selected         = FrameworkInformation.ResourcePath + "IoT_check_on.png",
                        SelectedPressed  = FrameworkInformation.ResourcePath + "IoT_check_on_p.png",
                        SelectedFocused  = FrameworkInformation.ResourcePath + "IoT_check_on_f.png",
                        DisabledSelected = FrameworkInformation.ResourcePath + "IoT_check_on_d.png",
                    },
                },
                Text = new TextLabelStyle()
                {
                    TextColor = new Color("#001447"),
                    PixelSize = 32,
                }
            });

            // Popup base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.Popup", new PopupStyle()
            {
                Size            = new Size(500, 280),
                BackgroundColor = new Color(0.9f, 0.9f, 0.9f, 1),
                ImageShadow     = new ImageShadow()
                {
                    Url     = FrameworkInformation.ResourcePath + "nui_component_default_popup_shadow.png",
                    Border  = new Rectangle(24, 24, 24, 24),
                    Extents = new Vector2(48, 48)
                },
                Title = new TextLabelStyle()
                {
                    PointSize = 16,
                    Padding   = new Extents(20, 20, 20, 20),
                },
                Buttons = new ButtonStyle()
                {
                    Size            = new Size(0, 80),
                    CornerRadius    = 0,
                    BackgroundColor = new Selector <Color>()
                    {
                        Normal  = new Color(1, 1, 1, 1),
                        Pressed = new Color(1, 1, 1, 0.5f),
                    },
                    Overlay = new ImageViewStyle()
                    {
                        BackgroundColor = new Selector <Color>()
                        {
                            Pressed = new Color(0, 0, 0, 0.1f),
                            Other   = new Color(1, 1, 1, 0.1f),
                        },
                    },
                    Text = new TextLabelStyle()
                    {
                        TextColor = new Color(0.05f, 0.63f, 0.9f, 1),
                    }
                }
            });

            // Progress base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.Progress", new ProgressStyle()
            {
                Size  = new Size(200, 25),
                Track = new ImageViewStyle()
                {
                    BorderlineWidth = 0.5f,
                    BorderlineColor = new Color(0.92f, 0.93f, 0.94f, 1.0f),
                    BackgroundColor = new Selector <Color>()
                    {
                        Normal   = new Color(1.0f, 1.0f, 1.0f, 0.5f),
                        Disabled = new Color(0.73f, 0.76f, 0.79f, 1),
                    },
                },
                Buffer = new ImageViewStyle()
                {
                    BackgroundColor = new Color(0.05f, 0.63f, 0.9f, 0.3f),
                },
                Progress = new ImageViewStyle()
                {
                    BackgroundColor = new Color(0.03f, 0.05f, 0.29f, 1),
                },
                IndeterminateImageUrl = FrameworkInformation.ResourcePath + "nui_component_default_progress_indeterminate.png",
            });

            // RadioButton base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.RadioButton", new ButtonStyle()
            {
                ItemSpacing             = new Size2D(32, 32),
                ItemHorizontalAlignment = HorizontalAlignment.Begin,
                ItemVerticalAlignment   = VerticalAlignment.Center,
                Icon = new ImageViewStyle()
                {
                    Size        = new Size(36, 36),
                    ResourceUrl = new Selector <string>()
                    {
                        Normal           = FrameworkInformation.ResourcePath + "IoT_radiobutton_off.png",
                        Pressed          = FrameworkInformation.ResourcePath + "IoT_radiobutton_off_p.png",
                        Disabled         = FrameworkInformation.ResourcePath + "IoT_radiobutton_off_d.png",
                        Focused          = FrameworkInformation.ResourcePath + "IoT_radiobutton_off_f.png",
                        Selected         = FrameworkInformation.ResourcePath + "IoT_radiobutton_on.png",
                        SelectedPressed  = FrameworkInformation.ResourcePath + "IoT_radiobutton_on_p.png",
                        SelectedFocused  = FrameworkInformation.ResourcePath + "IoT_radiobutton_on_f.png",
                        DisabledSelected = FrameworkInformation.ResourcePath + "IoT_radiobutton_on_d.png",
                    },
                },
                Text = new TextLabelStyle()
                {
                    TextColor = new Color("#001447"),
                    PixelSize = 32,
                }
            });

            // Slider base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.Slider", new SliderStyle()
            {
                Size           = new Size(200, 50),
                TrackThickness = 8,
                Track          = new ImageViewStyle()
                {
                    Size            = new Size(100, 8),
                    BorderlineWidth = 0.5f,
                    BorderlineColor = new Color(0.84f, 0.85f, 0.87f, 1.0f),
                    BackgroundColor = new Selector <Color>()
                    {
                        Normal   = new Color(1.0f, 1.0f, 1.0f, 0.2f),
                        Disabled = new Color(0.76f, 0.79f, 0.82f, 1),
                    },
                },
                Progress = new ImageViewStyle()
                {
                    Size            = new Size(100, 8),
                    BackgroundColor = new Selector <Color>()
                    {
                        Normal   = new Color(0.03f, 0.05f, 0.3f, 1),
                        Disabled = new Color(0.76f, 0.79f, 0.82f, 1),
                    },
                },
                Thumb = new ImageViewStyle()
                {
                    Size        = new Size(36, 36),
                    ResourceUrl = new Selector <string>()
                    {
                        Normal   = FrameworkInformation.ResourcePath + "IoT_slider_handler_normal.png",
                        Pressed  = FrameworkInformation.ResourcePath + "IoT_slider_handler_pressed.png",
                        Focused  = FrameworkInformation.ResourcePath + "IoT_slider_handler_pressed.png",
                        Disabled = FrameworkInformation.ResourcePath + "IoT_slider_handler_disabled.png",
                    },
                },
                ValueIndicatorImage = new ImageViewStyle()
                {
                    Size            = new Size(49, 24),
                    BackgroundColor = new Color(0.0f, 0.04f, 0.16f, 1.0f),
                },
            });

            // Switch base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.Switch", new SwitchStyle()
            {
                ItemSpacing             = new Size2D(32, 32),
                ItemHorizontalAlignment = HorizontalAlignment.Begin,
                ItemVerticalAlignment   = VerticalAlignment.Center,
                Track = new ImageViewStyle()
                {
                    Size        = new Size(80, 40),
                    ResourceUrl = new Selector <string>()
                    {
                        Normal           = FrameworkInformation.ResourcePath + "IoT_switch_track_off.png",
                        Pressed          = FrameworkInformation.ResourcePath + "IoT_switch_track_off_p.png",
                        Disabled         = FrameworkInformation.ResourcePath + "IoT_switch_track_off_d.png",
                        Focused          = FrameworkInformation.ResourcePath + "IoT_switch_track_off_f.png",
                        Selected         = FrameworkInformation.ResourcePath + "IoT_switch_track_on.png",
                        SelectedPressed  = FrameworkInformation.ResourcePath + "IoT_switch_track_on_p.png",
                        SelectedFocused  = FrameworkInformation.ResourcePath + "IoT_switch_track_on_f.png",
                        DisabledSelected = FrameworkInformation.ResourcePath + "IoT_switch_track_on_d.png",
                    },
                },
                Thumb = new ImageViewStyle()
                {
                    Size        = new Size(40, 40),
                    ResourceUrl = new Selector <string>()
                    {
                        Normal          = FrameworkInformation.ResourcePath + "IoT_switch_thumb.png",
                        Disabled        = FrameworkInformation.ResourcePath + "IoT_switch_thumb_d.png",
                        Selected        = FrameworkInformation.ResourcePath + "IoT_switch_thumb_s.png",
                        SelectedPressed = FrameworkInformation.ResourcePath + "IoT_switch_thumb_sp.png",
                        SelectedFocused = FrameworkInformation.ResourcePath + "IoT_switch_thumb_sf.png",
                    }
                },
                Text = new TextLabelStyle()
                {
                    TextColor = new Color("#001447"),
                    PixelSize = 32,
                }
            });

            // Loading base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.Loading", new LoadingStyle()
            {
                LoadingSize = new Size(100, 100),
            });

            // Pagination base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.Pagination", new PaginationStyle()
            {
                IndicatorImageUrl = new Selector <string>()
                {
                    Normal   = FrameworkInformation.ResourcePath + "nui_component_default_pagination_normal_dot.png",
                    Selected = FrameworkInformation.ResourcePath + "nui_component_default_pagination_focus_dot.png",
                },
                IndicatorSize = new Size(10, 10),
            });

            // Scrollbar base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.Scrollbar", new ScrollbarStyle()
            {
                TrackThickness          = 12,
                ThumbThickness          = 12,
                TrackColor              = new Color(0f, 0f, 0f, 0f),
                ThumbColor              = new Color("#0A0E4A"),
                TrackPadding            = 4,
                ThumbVerticalImageUrl   = FrameworkInformation.ResourcePath + "nui_component_default_scroll_vbar.#.png",
                ThumbHorizontalImageUrl = FrameworkInformation.ResourcePath + "nui_component_default_scroll_hbar.#.png",
            });

            // LinearLayouter base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.LinearLayouter", new ViewStyle()
            {
                Padding = new Extents(64, 64, 0, 0)
            });

            // GridLayouter base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.GridLayouter", new ViewStyle()
            {
                Padding = new Extents(0, 0, 0, 0),
            });

            // ItemsLayouter base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.ItemsLayouter", new ViewStyle()
            {
                Padding = new Extents(0, 0, 0, 0),
            });

            // RecyclerViewItem base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.RecyclerViewItem", new RecyclerViewItemStyle()
            {
                BackgroundColor = new Selector <Color>()
                {
                    Normal   = new Color(1, 1, 1, 1),
                    Pressed  = new Color(0.85f, 0.85f, 0.85f, 1),
                    Disabled = new Color(0.70f, 0.70f, 0.70f, 1),
                    Selected = new Color(0.701f, 0.898f, 0.937f, 1),
                },
            });

            // DefaultLinearItem base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.DefaultLinearItem", new DefaultLinearItemStyle()
            {
                SizeHeight      = 108,
                Padding         = new Extents(64, 64, 18, 17),
                Margin          = new Extents(0, 0, 0, 0),
                BackgroundColor = new Selector <Color>()
                {
                    Normal   = new Color(1, 1, 1, 1),
                    Pressed  = new Color(0.85f, 0.85f, 0.85f, 1),
                    Disabled = new Color(0.70f, 0.70f, 0.70f, 1),
                    Selected = new Color(0.85f, 0.85f, 0.85f, 1),
                },
                Label = new TextLabelStyle()
                {
                    PixelSize            = 32,
                    Ellipsis             = true,
                    FontFamily           = "BreezeSans", //FXIME Font Weight is Light
                    TextColor            = new Color("#001447"),
                    ThemeChangeSensitive = false
                },
                SubLabel = new TextLabelStyle()
                {
                    PixelSize            = 28,
                    Ellipsis             = true,
                    FontFamily           = "BreezeSans",
                    TextColor            = new Color("#001447"),
                    ThemeChangeSensitive = false
                },
                Icon = new ViewStyle()
                {
                    Margin = new Extents(0, 32, 0, 0)
                },
                Extra = new ViewStyle()
                {
                    Margin = new Extents(32, 0, 0, 0)
                },
                Seperator = new ViewStyle()
                {
                    SizeHeight      = 1,
                    Margin          = new Extents(64, 64, 0, 0),
                    BackgroundColor = new Color("#C3CAD2"),
                },
            });

            // DefaultGridItem base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.DefaultGridItem", new DefaultGridItemStyle()
            {
                Padding = new Extents(0, 0, 0, 0),
                Margin  = new Extents(5, 5, 5, 5),
                Label   = new TextLabelStyle()
                {
                    SizeHeight           = 60,
                    PixelSize            = 24,
                    LineWrapMode         = LineWrapMode.Character,
                    ThemeChangeSensitive = false
                },
                Badge = new ViewStyle()
                {
                    Margin = new Extents(5, 5, 5, 5),
                },
            });

            // DefaultTitleItem base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.DefaultTitleItem", new DefaultTitleItemStyle()
            {
                SizeHeight      = 60,
                Padding         = new Extents(64, 64, 12, 12),
                Margin          = new Extents(0, 0, 0, 0),
                BackgroundColor = new Selector <Color>()
                {
                    Normal = new Color("#EEEEF1"),
                },
                Label = new TextLabelStyle()
                {
                    PixelSize            = 28,
                    Ellipsis             = true,
                    TextColor            = new Color("#001447"),
                    ThemeChangeSensitive = false
                },
                Icon = new ViewStyle()
                {
                    Margin = new Extents(40, 0, 0, 0)
                },
                Seperator = new ViewStyle()
                {
                    Margin          = new Extents(0, 0, 0, 0),
                    BackgroundColor = new Color(0, 0, 0, 0),
                },
            });

            // ContentPage base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.ContentPage", new ViewStyle()
            {
                BackgroundColor = new Color("#EEEFF1"),
            });

            // AppBar base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.AppBar", new AppBarStyle()
            {
                Size            = new Size(-1, 120),
                BackgroundColor = new Color("#EEEFF1"),
                BackButton      = new ButtonStyle()
                {
                    Size            = new Size(48, 48),
                    CornerRadius    = 0,
                    BackgroundColor = new Color(0, 0, 0, 0),
                    Icon            = new ImageViewStyle()
                    {
                        Size        = new Size(48, 48),
                        ResourceUrl = FrameworkInformation.ResourcePath + "nui_component_default_back_button.png",
                        Color       = new Selector <Color>()
                        {
                            Normal   = new Color("#0A0E4A"),
                            Focused  = new Color("#00338B"),
                            Pressed  = new Color("#1B69CA"),
                            Disabled = new Color("#C3CAD2"),
                        },
                    },
                    ThemeChangeSensitive = false
                },
                TitleTextLabel = new TextLabelStyle()
                {
                    PixelSize         = 40,
                    VerticalAlignment = VerticalAlignment.Center,
                    TextColor         = new Selector <Color>()
                    {
                        Normal = new Color("#000C2B"),
                    },
                    ThemeChangeSensitive = false
                },
                ActionView = new ViewStyle()
                {
                    Size            = new Size(48, 120),
                    CornerRadius    = 0,
                    BackgroundColor = new Color(0, 0, 0, 0),
                },
                ActionButton = new ButtonStyle()
                {
                    Size            = new Size(-2, 120),
                    CornerRadius    = 0,
                    BackgroundColor = new Color(0, 0, 0, 0),
                    Text            = new TextLabelStyle()
                    {
                        PixelSize = 26,
                        TextColor = new Selector <Color>()
                        {
                            Normal   = new Color("#0A0E4A"),
                            Focused  = new Color("#00338B"),
                            Pressed  = new Color("#1B69CA"),
                            Disabled = new Color("#C3CAD2"),
                        },
                    },
                    Icon = new ImageViewStyle()
                    {
                        Size  = new Size(48, 48),
                        Color = new Selector <Color>()
                        {
                            Normal   = new Color("#0A0E4A"),
                            Focused  = new Color("#00338B"),
                            Pressed  = new Color("#1B69CA"),
                            Disabled = new Color("#C3CAD2"),
                        },
                    },
                    ThemeChangeSensitive = false,
                },
                Padding           = new Extents(64, 64, 0, 0),
                NavigationPadding = new Extents(0, 24, 0, 0),
                ActionPadding     = new Extents(40, 0, 0, 0),
                ActionCellPadding = new Size2D(40, 0),
            });

            // Picker base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.Picker", new PickerStyle()
            {
                Size          = new Size(160, 339),
                ItemTextLabel = new TextLabelStyle()
                {
                    //FIXME: Should be check PointSize. given size from UX is too large.
                    PixelSize           = 32,
                    VerticalAlignment   = VerticalAlignment.Center,
                    HorizontalAlignment = HorizontalAlignment.Center,
                    Size      = new Size(0, 72),
                    TextColor = new Selector <Color>()
                    {
                        Normal = new Color("#000C2B"),
                    },
                    BackgroundColor = Color.White,
                },
                Divider = new ViewStyle()
                {
                    SizeHeight        = 2.0f,
                    WidthResizePolicy = ResizePolicyType.FillToParent,
                    Position          = new Position(0, 132),
                    BackgroundColor   = new Color("#0A0E4A"),
                },
                StartScrollOffset = new Size(0, 12),
            });

            // TabButton base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.TabButton", new TabButtonStyle()
            {
                Size            = new Size(-1, 84),
                CornerRadius    = 0,
                BackgroundColor = Color.White,
                Text            = new TextLabelStyle()
                {
                    PixelSize = 28,
                    Size      = new Size(-2, -2),
                    TextColor = new Selector <Color>()
                    {
                        Normal   = new Color("#000C2B"),
                        Selected = new Color("#000C2B"),
                        Pressed  = new Color("#1473E6"),
                        Disabled = new Color("#C3CAD2"),
                    },
                    ThemeChangeSensitive = false,
                },
                Icon = new ImageViewStyle()
                {
                    Size  = new Size(48, 48),
                    Color = new Selector <Color>()
                    {
                        Normal   = new Color("#000C2B"),
                        Selected = new Color("#000C2B"),
                        Pressed  = new Color("#1473E6"),
                        Disabled = new Color("#C3CAD2"),
                    },
                },
                TopLine = new ViewStyle()
                {
                    Size            = new Size(-1, 1),
                    BackgroundColor = new Selector <Color>()
                    {
                        Normal   = new Color("#000C2B"),
                        Selected = new Color("#000C2B"),
                        Pressed  = new Color("#1473E6"),
                        Disabled = new Color("#C3CAD2"),
                    },
                },
                BottomLine = new ViewStyle()
                {
                    Size            = new Size(-1, 8),
                    Position        = new Position(0, 76), // 84 - 8
                    BackgroundColor = new Selector <Color>()
                    {
                        Normal   = Color.Transparent,
                        Selected = new Color("#000C2B"),
                        Pressed  = new Color("#1473E6"),
                        Disabled = Color.Transparent,
                    },
                },
            });

            // NotificationToast base style
            theme.AddStyleWithoutClone("NotificationToast", new TextLabelStyle()
            {
                BackgroundColor        = new Color("#F2F7FF"),
                CornerRadius           = 20.0f,
                BoxShadow              = new Shadow(5.0f, new Color("#00000066"), new Vector2(2.0f, 2.0f)),
                TextColor              = new Color("#000C2B"),
                PixelSize              = 32,
                WidthResizePolicy      = ResizePolicyType.UseNaturalSize,
                HeightResizePolicy     = ResizePolicyType.UseNaturalSize,
                PositionUsesPivotPoint = true,
                HorizontalAlignment    = HorizontalAlignment.Center,
                VerticalAlignment      = VerticalAlignment.Center,
                Padding   = new Extents(40, 40, 24, 24),
                PositionY = 120,
            });

            // AlertDialog base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.AlertDialog", new AlertDialogStyle()
            {
                Size            = new Size(-2, -2),
                Padding         = new Extents(80, 80, 0, 0),
                BackgroundColor = Color.White,
                CornerRadius    = 28.0f,
                BoxShadow       = new Shadow(2.0f, new Color("#00000029"), new Vector2(2.0f, 2.0f)),
                TitleTextLabel  = new TextLabelStyle()
                {
                    Size                 = new Size(720, -2),
                    Margin               = new Extents(0, 0, 40, 40),
                    PixelSize            = 40,
                    HorizontalAlignment  = HorizontalAlignment.Center,
                    VerticalAlignment    = VerticalAlignment.Center,
                    TextColor            = new Color("#000C2B"),
                    ThemeChangeSensitive = false,
                },
                MessageTextLabel = new TextLabelStyle()
                {
                    Size                 = new Size(720, -2),
                    Margin               = new Extents(0, 0, 0, 64),
                    PixelSize            = 32,
                    MultiLine            = true,
                    HorizontalAlignment  = HorizontalAlignment.Center,
                    VerticalAlignment    = VerticalAlignment.Center,
                    TextColor            = new Color("#000C2B"),
                    ThemeChangeSensitive = false,
                },
                ActionContent = new ViewStyle()
                {
                    Size = new Size(720, -2),
                },
            });

            // TimePicker base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.TimePicker", new TimePickerStyle()
            {
                CellPadding = new Size(50, 339),

                Pickers = new PickerStyle()
                {
                    Size          = new Size(160, 339),
                    ItemTextLabel = new TextLabelStyle()
                    {
                        //FIXME: Should be check PointSize. given size from UX is too large.
                        PixelSize           = 32,
                        VerticalAlignment   = VerticalAlignment.Center,
                        HorizontalAlignment = HorizontalAlignment.Center,
                        Size                 = new Size(0, 72),
                        TextColor            = new Color("#000C2B"),
                        BackgroundColor      = Color.White,
                        ThemeChangeSensitive = false
                    },
                    Divider = new ViewStyle()
                    {
                        SizeHeight        = 2.0f,
                        WidthResizePolicy = ResizePolicyType.FillToParent,
                        Position          = new Position(0, 132),
                        BackgroundColor   = new Color("#0A0E4A"),
                    },
                    StartScrollOffset = new Size2D(0, 12),
                }
            });

            // DatePicker base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.DatePicker", new DatePickerStyle()
            {
                CellPadding = new Size(50, 339),

                Pickers = new PickerStyle()
                {
                    Size          = new Size(160, 339),
                    ItemTextLabel = new TextLabelStyle()
                    {
                        //FIXME: Should be check PointSize. given size from UX is too large.
                        PixelSize           = 32,
                        VerticalAlignment   = VerticalAlignment.Center,
                        HorizontalAlignment = HorizontalAlignment.Center,
                        Size                 = new Size(0, 72),
                        TextColor            = new Color("#000C2B"),
                        BackgroundColor      = Color.White,
                        ThemeChangeSensitive = false
                    },
                    Divider = new ViewStyle()
                    {
                        SizeHeight        = 2.0f,
                        WidthResizePolicy = ResizePolicyType.FillToParent,
                        Position          = new Position(0, 132),
                        BackgroundColor   = new Color("#0A0E4A"),
                    },
                    StartScrollOffset = new Size2D(0, 12),
                }
            });

            // MenuItem base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.MenuItem", new ButtonStyle()
            {
                Size            = new Size(480, -2),
                MinimumSize     = new Size2D(0, 72),
                CornerRadius    = 0,
                BackgroundImage = FrameworkInformation.ResourcePath + "nui_component_menu_item_bg.png",
                Padding         = new Extents(16, 16, 16, 16),
                Text            = new TextLabelStyle()
                {
                    PixelSize           = 32,
                    MultiLine           = true,
                    HorizontalAlignment = HorizontalAlignment.Begin,
                    VerticalAlignment   = VerticalAlignment.Center,
                    TextColor           = new Selector <Color>()
                    {
                        Normal   = new Color("#001447"),
                        Focused  = new Color("#00338B"),
                        Pressed  = new Color("#1B69CA"),
                        Disabled = new Color("#C3CAD2"),
                        Selected = new Color("#1B69CA"),
                    },
                    ThemeChangeSensitive = false
                },
                Icon = new ImageViewStyle()
                {
                    Size  = new Size(-2, 48),
                    Color = new Selector <Color>()
                    {
                        Normal   = new Color("#001447"),
                        Focused  = new Color("#00338B"),
                        Pressed  = new Color("#1B69CA"),
                        Disabled = new Color("#C3CAD2"),
                        Selected = new Color("#1B69CA"),
                    },
                },
            });

            return(theme);
        }
Esempio n. 3
0
        public Theme Create()
        {
            var theme = new Theme()
            {
                Id      = Tizen.NUI.DefaultThemeCreator.DefaultId,
                Version = Tizen.NUI.DefaultThemeCreator.DefaultVersion
            };

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Button", new ButtonStyle()
            {
                Size = new Size(339, 96),
                CornerRadiusPolicy = VisualTransformPolicyType.Relative,
                CornerRadius       = 0.2916f,
                BackgroundColor    = new Selector <Color>()
                {
                    Normal   = new Color(0.039f, 0.055f, 0.29f, 1),
                    Pressed  = new Color(0.106f, 0.412f, 0.792f, 1),
                    Focused  = new Color(0, 0.2f, 0.545f, 1),
                    Disabled = new Color(0.765f, 0.792f, 0.824f, 1),
                },
                Text = new TextLabelStyle()
                {
                    PixelSize = 32,
                    TextColor = Color.White,
                }
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.CheckBox", new ButtonStyle()
            {
                TextPadding = new Extents(32, 0, 0, 0),
                Icon        = new ImageViewStyle()
                {
                    Size        = new Size(36, 36),
                    ResourceUrl = new Selector <string>()
                    {
                        Normal           = FrameworkInformation.ResourcePath + "IoT_check_off.svg",
                        Pressed          = FrameworkInformation.ResourcePath + "IoT_check_off_p.svg",
                        Disabled         = FrameworkInformation.ResourcePath + "IoT_check_off_d.svg",
                        Focused          = FrameworkInformation.ResourcePath + "IoT_check_off_f.svg",
                        Selected         = FrameworkInformation.ResourcePath + "IoT_check_on.svg",
                        SelectedPressed  = FrameworkInformation.ResourcePath + "IoT_check_on_p.svg",
                        SelectedFocused  = FrameworkInformation.ResourcePath + "IoT_check_on_f.svg",
                        DisabledSelected = FrameworkInformation.ResourcePath + "IoT_check_on_d.svg",
                    },
                },
                Text = new TextLabelStyle()
                {
                    PixelSize = 32,
                    TextColor = new Color("#001447")
                }
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Popup", new PopupStyle()
            {
                Size            = new Size(500, 280),
                BackgroundColor = new Color(0.9f, 0.9f, 0.9f, 1),
                ImageShadow     = new ImageShadow()
                {
                    Url     = FrameworkInformation.ResourcePath + "nui_component_default_popup_shadow.png",
                    Border  = new Rectangle(24, 24, 24, 24),
                    Extents = new Vector2(48, 48)
                },
                Title = new TextLabelStyle()
                {
                    PointSize = 16,
                    Padding   = new Extents(20, 20, 20, 20),
                },
                Buttons = new ButtonStyle()
                {
                    Size            = new Size(0, 80),
                    BackgroundColor = new Selector <Color>()
                    {
                        Normal  = new Color(1, 1, 1, 1),
                        Pressed = new Color(1, 1, 1, 0.5f),
                    },
                    Overlay = new ImageViewStyle()
                    {
                        BackgroundColor = new Selector <Color>()
                        {
                            Pressed = new Color(0, 0, 0, 0.1f),
                            Other   = new Color(1, 1, 1, 0.1f),
                        },
                    },
                    Text = new TextLabelStyle()
                    {
                        TextColor = new Color(0.05f, 0.63f, 0.9f, 1),
                    }
                }
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Progress", new ProgressStyle()
            {
                Size  = new Size(200, 5),
                Track = new ImageViewStyle()
                {
                    BackgroundColor = new Color(0, 0, 0, 0.1f),
                },
                Buffer = new ImageViewStyle()
                {
                    BackgroundColor = new Color(0.05f, 0.63f, 0.9f, 0.3f),
                },
                Progress = new ImageViewStyle()
                {
                    BackgroundColor = new Color(0.05f, 0.63f, 0.9f, 1),
                },
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.RadioButton", new ButtonStyle()
            {
                TextPadding = new Extents(32, 0, 0, 0),
                Icon        = new ImageViewStyle()
                {
                    Size        = new Size(36, 36),
                    ResourceUrl = new Selector <string>()
                    {
                        Normal           = FrameworkInformation.ResourcePath + "IoT_radiobutton_off.svg",
                        Pressed          = FrameworkInformation.ResourcePath + "IoT_radiobutton_off_p.svg",
                        Disabled         = FrameworkInformation.ResourcePath + "IoT_radiobutton_off_d.svg",
                        Focused          = FrameworkInformation.ResourcePath + "IoT_radiobutton_off_f.svg",
                        Selected         = FrameworkInformation.ResourcePath + "IoT_radiobutton_on.svg",
                        SelectedPressed  = FrameworkInformation.ResourcePath + "IoT_radiobutton_on_p.svg",
                        SelectedFocused  = FrameworkInformation.ResourcePath + "IoT_radiobutton_on_f.svg",
                        DisabledSelected = FrameworkInformation.ResourcePath + "IoT_radiobutton_on_d.svg",
                    },
                },
                Text = new TextLabelStyle()
                {
                    PixelSize = 32,
                    TextColor = new Color("#001447")
                }
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Slider", 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.5f, 0.63f, 0.9f, 1),
                },
                Thumb = new ImageViewStyle()
                {
                    Size            = new Size(50, 50),
                    ResourceUrl     = FrameworkInformation.ResourcePath + "nui_component_default_slider_thumb_n.png",
                    BackgroundImage = new Selector <string>()
                    {
                        Normal  = FrameworkInformation.ResourcePath + "nui_component_default_slider_thumb_bg_p.png",
                        Pressed = FrameworkInformation.ResourcePath + "nui_component_default_slider_thumb_bg_p.png",
                    }
                },
                ValueIndicatorImage = new ImageViewStyle()
                {
                    Size        = new Size(83, 54),
                    ResourceUrl = FrameworkInformation.ResourcePath + "nui_component_default_slider_value_indicator.png",
                },
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Switch", new SwitchStyle()
            {
                TextPadding = new Extents(32, 0, 0, 0),
                Track       = new ImageViewStyle()
                {
                    Size        = new Size(80, 40),
                    ResourceUrl = new Selector <string>()
                    {
                        Normal           = FrameworkInformation.ResourcePath + "IoT_switch_track_off.svg",
                        Pressed          = FrameworkInformation.ResourcePath + "IoT_switch_track_off_p.svg",
                        Disabled         = FrameworkInformation.ResourcePath + "IoT_switch_track_off_d.svg",
                        Focused          = FrameworkInformation.ResourcePath + "IoT_switch_track_off_f.svg",
                        Selected         = FrameworkInformation.ResourcePath + "IoT_switch_track_on.svg",
                        SelectedPressed  = FrameworkInformation.ResourcePath + "IoT_switch_track_on_p.svg",
                        SelectedFocused  = FrameworkInformation.ResourcePath + "IoT_switch_track_on_f.svg",
                        DisabledSelected = FrameworkInformation.ResourcePath + "IoT_switch_track_on_d.svg",
                    },
                },
                Thumb = new ImageViewStyle()
                {
                    Size        = new Size(40, 40),
                    ResourceUrl = new Selector <string>()
                    {
                        Normal          = FrameworkInformation.ResourcePath + "IoT_switch_thumb.svg",
                        Disabled        = FrameworkInformation.ResourcePath + "IoT_switch_thumb_d.svg",
                        Selected        = FrameworkInformation.ResourcePath + "IoT_switch_thumb_s.svg",
                        SelectedPressed = FrameworkInformation.ResourcePath + "IoT_switch_thumb_sp.svg",
                        SelectedFocused = FrameworkInformation.ResourcePath + "IoT_switch_thumb_sf.svg",
                    }
                },
                Text = new TextLabelStyle()
                {
                    PixelSize = 32,
                    TextColor = new Color("#001447")
                }
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Loading", new LoadingStyle()
            {
                LoadingSize = new Size(100, 100),
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Pagination", new PaginationStyle()
            {
                IndicatorImageUrl = new Selector <string>()
                {
                    Normal   = FrameworkInformation.ResourcePath + "nui_component_default_pagination_normal_dot.png",
                    Selected = FrameworkInformation.ResourcePath + "nui_component_default_pagination_focus_dot.png",
                },
                IndicatorSize = new Size(10, 10),
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Scrollbar", new ScrollbarStyle()
            {
                TrackThickness = 6,
                ThumbThickness = 6,
                TrackColor     = new Color(1, 1, 1, 0.15f),
                ThumbColor     = new Color(0.6f, 0.6f, 0.6f, 1.0f),
                TrackPadding   = 4
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.RecyclerViewItem", new RecyclerViewItemStyle()
            {
                BackgroundColor = new Selector <Color>()
                {
                    Normal   = new Color(1, 1, 1, 1),
                    Pressed  = new Color(0.85f, 0.85f, 0.85f, 1),
                    Disabled = new Color(0.70f, 0.70f, 0.70f, 1),
                    Selected = new Color(0.701f, 0.898f, 0.937f, 1),
                },
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.DefaultLinearItem", new DefaultLinearItemStyle()
            {
                SizeHeight      = 130,
                Padding         = new Extents(20, 20, 5, 5),
                BackgroundColor = new Selector <Color>()
                {
                    Normal   = new Color(1, 1, 1, 1),
                    Pressed  = new Color(0.85f, 0.85f, 0.85f, 1),
                    Disabled = new Color(0.70f, 0.70f, 0.70f, 1),
                    Selected = new Color(0.701f, 0.898f, 0.937f, 1),
                },
                Label = new TextLabelStyle()
                {
                    PointSize = 10,
                    Ellipsis  = true,
                },
                SubLabel = new TextLabelStyle()
                {
                    PointSize = 6,
                    Ellipsis  = true,
                },
                Icon = new ViewStyle()
                {
                    Margin = new Extents(0, 20, 0, 0)
                },
                Extra = new ViewStyle()
                {
                    Margin = new Extents(20, 0, 0, 0)
                },
                Seperator = new ViewStyle()
                {
                    Margin          = new Extents(5, 5, 0, 0),
                    BackgroundColor = new Color(0.78f, 0.78f, 0.78f, 1),
                },
            });
            theme.AddStyleWithoutClone("Tizen.NUI.Components.DefaultGridItem", new DefaultGridItemStyle()
            {
                Padding = new Extents(5, 5, 5, 5),
                Caption = new TextLabelStyle()
                {
                    PointSize = 9,
                    Ellipsis  = true,
                },
                Badge = new ViewStyle()
                {
                    Margin = new Extents(5, 5, 5, 5),
                },
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.DefaultTitleItem", new DefaultTitleItemStyle()
            {
                SizeHeight      = 90,
                Padding         = new Extents(10, 10, 5, 5),
                BackgroundColor = new Selector <Color>()
                {
                    Normal = new Color(0.78f, 0.78f, 0.78f, 1),
                },
                Label = new TextLabelStyle()
                {
                    PointSize = 10,
                    Ellipsis  = true,
                },
                Icon = new ViewStyle()
                {
                    Margin = new Extents(10, 0, 0, 0)
                },
                Seperator = new ViewStyle()
                {
                    Margin          = new Extents(0, 0, 0, 0),
                    BackgroundColor = new Color(0.85f, 0.85f, 0.85f, 1),
                },
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.AppBar", new AppBarStyle()
            {
                Size            = new Size(-1, 120),
                BackgroundColor = new Color("#EEEFF1FF"),
                BackButton      = new ButtonStyle()
                {
                    Size            = new Size(48, 48),
                    CornerRadius    = 0,
                    BackgroundColor = new Color(0, 0, 0, 0),
                    Icon            = new ImageViewStyle()
                    {
                        Size        = new Size(48, 48),
                        ResourceUrl = FrameworkInformation.ResourcePath + "nui_component_default_back_button.png",
                        Color       = new Selector <Color>()
                        {
                            Normal   = new Color("#0A0E4AFF"),
                            Focused  = new Color("#00338BFF"),
                            Pressed  = new Color("#1B69CAFF"),
                            Disabled = new Color("#C3CAD2FF"),
                        },
                    },
                },
                TitleTextLabel = new TextLabelStyle()
                {
                    PixelSize         = 40,
                    VerticalAlignment = VerticalAlignment.Center,
                    TextColor         = new Selector <Color>()
                    {
                        Normal = new Color("#000C2BFF"),
                    }
                },
                ActionView = new ViewStyle()
                {
                    Size            = new Size(-1, 48),
                    CornerRadius    = 0,
                    BackgroundColor = new Color(0, 0, 0, 0),
                },
                ActionButton = new ButtonStyle()
                {
                    Size            = new Size(-1, 48),
                    CornerRadius    = 0,
                    BackgroundColor = new Color(0, 0, 0, 0),
                    Text            = new TextLabelStyle()
                    {
                        PixelSize = 26,
                        TextColor = new Selector <Color>()
                        {
                            Normal   = new Color("#0A0E4AFF"),
                            Focused  = new Color("#00338BFF"),
                            Pressed  = new Color("#1B69CAFF"),
                            Disabled = new Color("#C3CAD2FF"),
                        },
                    },
                    Icon = new ImageViewStyle()
                    {
                        Size  = new Size(-1, 48),
                        Color = new Selector <Color>()
                        {
                            Normal   = new Color("#0A0E4AFF"),
                            Focused  = new Color("#00338BFF"),
                            Pressed  = new Color("#1B69CAFF"),
                            Disabled = new Color("#C3CAD2FF"),
                        },
                    },
                },
                Padding           = new Extents(64, 64, 0, 0),
                NavigationPadding = new Extents(0, 24, 0, 0),
                ActionPadding     = new Extents(40, 0, 0, 0),
                ActionCellPadding = new Size2D(40, 0),
            });

            return(theme);
        }
Esempio n. 4
0
        public Theme Create()
        {
            var theme = new Theme()
            {
                Id      = Tizen.NUI.DefaultThemeCreator.DefaultId,
                Version = Tizen.NUI.DefaultThemeCreator.DefaultVersion
            };

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Button", new ButtonStyle()
            {
                Size = new Size(339, 96),
                CornerRadiusPolicy = VisualTransformPolicyType.Relative,
                CornerRadius       = 0.2916f,
                BackgroundColor    = new Selector <Color>()
                {
                    Normal   = new Color(0.039f, 0.055f, 0.29f, 1),
                    Pressed  = new Color(0.106f, 0.412f, 0.792f, 1),
                    Focused  = new Color(0, 0.2f, 0.545f, 1),
                    Disabled = new Color(0.765f, 0.792f, 0.824f, 1),
                },
                Text = new TextLabelStyle()
                {
                    PixelSize = 32,
                    TextColor = Color.White,
                }
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.CheckBox", new ButtonStyle()
            {
                TextPadding = new Extents(32, 0, 0, 0),
                Icon        = new ImageViewStyle()
                {
                    Size        = new Size(36, 36),
                    ResourceUrl = new Selector <string>()
                    {
                        Normal           = FrameworkInformation.ResourcePath + "IoT_check_off.svg",
                        Pressed          = FrameworkInformation.ResourcePath + "IoT_check_off_p.svg",
                        Disabled         = FrameworkInformation.ResourcePath + "IoT_check_off_d.svg",
                        Focused          = FrameworkInformation.ResourcePath + "IoT_check_off_f.svg",
                        Selected         = FrameworkInformation.ResourcePath + "IoT_check_on.svg",
                        SelectedPressed  = FrameworkInformation.ResourcePath + "IoT_check_on_p.svg",
                        SelectedFocused  = FrameworkInformation.ResourcePath + "IoT_check_on_f.svg",
                        DisabledSelected = FrameworkInformation.ResourcePath + "IoT_check_on_d.svg",
                    },
                },
                Text = new TextLabelStyle()
                {
                    PixelSize = 32,
                    TextColor = new Color("#001447")
                }
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Popup", new PopupStyle()
            {
                Size            = new Size(500, 280),
                BackgroundColor = new Color(0.9f, 0.9f, 0.9f, 1),
                ImageShadow     = new ImageShadow()
                {
                    Url     = FrameworkInformation.ResourcePath + "nui_component_default_popup_shadow.png",
                    Border  = new Rectangle(24, 24, 24, 24),
                    Extents = new Vector2(48, 48)
                },
                Title = new TextLabelStyle()
                {
                    PointSize = 16,
                    Padding   = new Extents(20, 20, 20, 20),
                },
                Buttons = new ButtonStyle()
                {
                    Size            = new Size(0, 80),
                    BackgroundColor = new Selector <Color>()
                    {
                        Normal  = new Color(1, 1, 1, 1),
                        Pressed = new Color(1, 1, 1, 0.5f),
                    },
                    Overlay = new ImageViewStyle()
                    {
                        BackgroundColor = new Selector <Color>()
                        {
                            Pressed = new Color(0, 0, 0, 0.1f),
                            Other   = new Color(1, 1, 1, 0.1f),
                        },
                    },
                    Text = new TextLabelStyle()
                    {
                        TextColor = new Color(0.05f, 0.63f, 0.9f, 1),
                    }
                }
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Progress", new ProgressStyle()
            {
                Size  = new Size(200, 5),
                Track = new ImageViewStyle()
                {
                    BackgroundColor = new Color(0, 0, 0, 0.1f),
                },
                Buffer = new ImageViewStyle()
                {
                    BackgroundColor = new Color(0.05f, 0.63f, 0.9f, 0.3f),
                },
                Progress = new ImageViewStyle()
                {
                    BackgroundColor = new Color(0.05f, 0.63f, 0.9f, 1),
                },
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.RadioButton", new ButtonStyle()
            {
                TextPadding = new Extents(32, 0, 0, 0),
                Icon        = new ImageViewStyle()
                {
                    Size        = new Size(36, 36),
                    ResourceUrl = new Selector <string>()
                    {
                        Normal           = FrameworkInformation.ResourcePath + "IoT_radiobutton_off.svg",
                        Pressed          = FrameworkInformation.ResourcePath + "IoT_radiobutton_off_p.svg",
                        Disabled         = FrameworkInformation.ResourcePath + "IoT_radiobutton_off_d.svg",
                        Focused          = FrameworkInformation.ResourcePath + "IoT_radiobutton_off_f.svg",
                        Selected         = FrameworkInformation.ResourcePath + "IoT_radiobutton_on.svg",
                        SelectedPressed  = FrameworkInformation.ResourcePath + "IoT_radiobutton_on_p.svg",
                        SelectedFocused  = FrameworkInformation.ResourcePath + "IoT_radiobutton_on_f.svg",
                        DisabledSelected = FrameworkInformation.ResourcePath + "IoT_radiobutton_on_d.svg",
                    },
                },
                Text = new TextLabelStyle()
                {
                    PixelSize = 32,
                    TextColor = new Color("#001447")
                }
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Slider", 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.5f, 0.63f, 0.9f, 1),
                },
                Thumb = new ImageViewStyle()
                {
                    Size            = new Size(50, 50),
                    ResourceUrl     = FrameworkInformation.ResourcePath + "nui_component_default_slider_thumb_n.png",
                    BackgroundImage = new Selector <string>()
                    {
                        Normal  = FrameworkInformation.ResourcePath + "nui_component_default_slider_thumb_bg_p.png",
                        Pressed = FrameworkInformation.ResourcePath + "nui_component_default_slider_thumb_bg_p.png",
                    }
                },
                ValueIndicatorImage = new ImageViewStyle()
                {
                    Size        = new Size(83, 54),
                    ResourceUrl = FrameworkInformation.ResourcePath + "nui_component_default_slider_value_indicator.png",
                },
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Switch", new SwitchStyle()
            {
                TextPadding = new Extents(32, 0, 0, 0),
                Track       = new ImageViewStyle()
                {
                    Size        = new Size(80, 40),
                    ResourceUrl = new Selector <string>()
                    {
                        Normal           = FrameworkInformation.ResourcePath + "IoT_switch_track_off.svg",
                        Pressed          = FrameworkInformation.ResourcePath + "IoT_switch_track_off_p.svg",
                        Disabled         = FrameworkInformation.ResourcePath + "IoT_switch_track_off_d.svg",
                        Focused          = FrameworkInformation.ResourcePath + "IoT_switch_track_off_f.svg",
                        Selected         = FrameworkInformation.ResourcePath + "IoT_switch_track_on.svg",
                        SelectedPressed  = FrameworkInformation.ResourcePath + "IoT_switch_track_on_p.svg",
                        SelectedFocused  = FrameworkInformation.ResourcePath + "IoT_switch_track_on_f.svg",
                        DisabledSelected = FrameworkInformation.ResourcePath + "IoT_switch_track_on_d.svg",
                    },
                },
                Thumb = new ImageViewStyle()
                {
                    Size        = new Size(40, 40),
                    ResourceUrl = new Selector <string>()
                    {
                        Normal          = FrameworkInformation.ResourcePath + "IoT_switch_thumb.svg",
                        Disabled        = FrameworkInformation.ResourcePath + "IoT_switch_thumb_d.svg",
                        Selected        = FrameworkInformation.ResourcePath + "IoT_switch_thumb_s.svg",
                        SelectedPressed = FrameworkInformation.ResourcePath + "IoT_switch_thumb_sp.svg",
                        SelectedFocused = FrameworkInformation.ResourcePath + "IoT_switch_thumb_sf.svg",
                    }
                },
                Text = new TextLabelStyle()
                {
                    PixelSize = 32,
                    TextColor = new Color("#001447")
                }
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Loading", new LoadingStyle()
            {
                LoadingSize = new Size(100, 100),
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Pagination", new PaginationStyle()
            {
                IndicatorImageUrl = new Selector <string>()
                {
                    Normal   = FrameworkInformation.ResourcePath + "nui_component_default_pagination_normal_dot.png",
                    Selected = FrameworkInformation.ResourcePath + "nui_component_default_pagination_focus_dot.png",
                },
                IndicatorSize = new Size(10, 10),
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Scrollbar", new ScrollbarStyle()
            {
                TrackThickness = 6,
                ThumbThickness = 6,
                TrackColor     = new Color(1, 1, 1, 0.15f),
                ThumbColor     = new Color(0.6f, 0.6f, 0.6f, 1.0f),
                TrackPadding   = 4
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.RecyclerViewItem", new RecyclerViewItemStyle()
            {
                BackgroundColor = new Selector <Color>()
                {
                    Normal   = new Color(1, 1, 1, 1),
                    Pressed  = new Color(0.85f, 0.85f, 0.85f, 1),
                    Disabled = new Color(0.70f, 0.70f, 0.70f, 1),
                    Selected = new Color(0.701f, 0.898f, 0.937f, 1),
                },
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.DefaultLinearItem", new DefaultLinearItemStyle()
            {
                SizeHeight      = 108,
                Padding         = new Extents(64, 64, 18, 17),
                BackgroundColor = new Selector <Color>()
                {
                    Normal   = new Color(1, 1, 1, 1),
                    Pressed  = new Color(0.85f, 0.85f, 0.85f, 1),
                    Disabled = new Color(0.70f, 0.70f, 0.70f, 1),
                    Selected = new Color(0.85f, 0.85f, 0.85f, 1),
                },
                Label = new TextLabelStyle()
                {
                    PixelSize  = 32,
                    Ellipsis   = true,
                    FontFamily = "BreezeSans", //FXIME Font Weight is Light
                    TextColor  = new Color("#001447FF"),
                },
                SubLabel = new TextLabelStyle()
                {
                    PixelSize  = 28,
                    Ellipsis   = true,
                    FontFamily = "BreezeSans",
                    TextColor  = new Color("#001447FF"),
                },
                Icon = new ViewStyle()
                {
                    Margin = new Extents(0, 32, 0, 0)
                },
                Extra = new ViewStyle()
                {
                    Margin = new Extents(32, 0, 0, 0)
                },
                Seperator = new ViewStyle()
                {
                    SizeHeight      = 1,
                    Margin          = new Extents(64, 64, 0, 0),
                    BackgroundColor = new Color("#C3CAD2FF"),
                },
            });
            theme.AddStyleWithoutClone("Tizen.NUI.Components.DefaultGridItem", new DefaultGridItemStyle()
            {
                Padding = new Extents(5, 5, 5, 5),
                Caption = new TextLabelStyle()
                {
                    SizeHeight   = 60,
                    PixelSize    = 24,
                    LineWrapMode = LineWrapMode.Character,
                },
                Badge = new ViewStyle()
                {
                    Margin = new Extents(5, 5, 5, 5),
                },
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.DefaultTitleItem", new DefaultTitleItemStyle()
            {
                SizeHeight      = 60,
                Padding         = new Extents(64, 64, 12, 12),
                BackgroundColor = new Selector <Color>()
                {
                    Normal = new Color("#EEEEF1FF"),
                },
                Label = new TextLabelStyle()
                {
                    PixelSize = 28,
                    Ellipsis  = true,
                    TextColor = new Color("#001447FF"),
                },
                Icon = new ViewStyle()
                {
                    Margin = new Extents(40, 0, 0, 0)
                },
                Seperator = new ViewStyle()
                {
                    Margin          = new Extents(0, 0, 0, 0),
                    BackgroundColor = new Color(0, 0, 0, 0),
                },
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.AppBar", new AppBarStyle()
            {
                Size            = new Size(-1, 120),
                BackgroundColor = new Color("#EEEFF1FF"),
                BackButton      = new ButtonStyle()
                {
                    Size            = new Size(48, 48),
                    CornerRadius    = 0,
                    BackgroundColor = new Color(0, 0, 0, 0),
                    Icon            = new ImageViewStyle()
                    {
                        Size        = new Size(48, 48),
                        ResourceUrl = FrameworkInformation.ResourcePath + "nui_component_default_back_button.png",
                        Color       = new Selector <Color>()
                        {
                            Normal   = new Color("#0A0E4AFF"),
                            Focused  = new Color("#00338BFF"),
                            Pressed  = new Color("#1B69CAFF"),
                            Disabled = new Color("#C3CAD2FF"),
                        },
                    },
                },
                TitleTextLabel = new TextLabelStyle()
                {
                    PixelSize         = 40,
                    VerticalAlignment = VerticalAlignment.Center,
                    TextColor         = new Selector <Color>()
                    {
                        Normal = new Color("#000C2BFF"),
                    }
                },
                ActionView = new ViewStyle()
                {
                    Size            = new Size(-1, 48),
                    CornerRadius    = 0,
                    BackgroundColor = new Color(0, 0, 0, 0),
                },
                ActionButton = new ButtonStyle()
                {
                    Size            = new Size(-1, 48),
                    CornerRadius    = 0,
                    BackgroundColor = new Color(0, 0, 0, 0),
                    Text            = new TextLabelStyle()
                    {
                        PixelSize = 26,
                        TextColor = new Selector <Color>()
                        {
                            Normal   = new Color("#0A0E4AFF"),
                            Focused  = new Color("#00338BFF"),
                            Pressed  = new Color("#1B69CAFF"),
                            Disabled = new Color("#C3CAD2FF"),
                        },
                    },
                    Icon = new ImageViewStyle()
                    {
                        Size  = new Size(-1, 48),
                        Color = new Selector <Color>()
                        {
                            Normal   = new Color("#0A0E4AFF"),
                            Focused  = new Color("#00338BFF"),
                            Pressed  = new Color("#1B69CAFF"),
                            Disabled = new Color("#C3CAD2FF"),
                        },
                    },
                },
                Padding           = new Extents(64, 64, 0, 0),
                NavigationPadding = new Extents(0, 24, 0, 0),
                ActionPadding     = new Extents(40, 0, 0, 0),
                ActionCellPadding = new Size2D(40, 0),
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Picker", new PickerStyle()
            {
                Size          = new Size(160, 339),
                ItemTextLabel = new TextLabelStyle()
                {
                    //FIXME: Should be check PointSize. given size from UX is too large.
                    PixelSize           = 32,
                    VerticalAlignment   = VerticalAlignment.Center,
                    HorizontalAlignment = HorizontalAlignment.Center,
                    Size      = new Size(0, 72),
                    TextColor = new Selector <Color>()
                    {
                        Normal = new Color("#000C2BFF"),
                    },
                    BackgroundColor = Color.White,
                },
                Divider = new ViewStyle()
                {
                    SizeHeight        = 2.0f,
                    WidthResizePolicy = ResizePolicyType.FillToParent,
                    Position          = new Position(0, 132),
                    BackgroundColor   = new Color("#0A0E4AFF"),
                },
                StartScrollOffset = new Size2D(0, 12),
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.TabButton", new TabButtonStyle()
            {
                Size            = new Size(-1, 84),
                CornerRadius    = 0,
                BackgroundColor = Color.White,
                Text            = new TextLabelStyle()
                {
                    PixelSize = 28,
                    Size      = new Size(-2, -2),
                    TextColor = new Selector <Color>()
                    {
                        Normal   = new Color("#000C2BFF"),
                        Selected = new Color("#000C2BFF"),
                        Pressed  = new Color("#1473E6FF"),
                        Disabled = new Color("#C3CAD2FF"),
                    },
                },
                Icon = new ImageViewStyle()
                {
                    Size  = new Size(48, 48),
                    Color = new Selector <Color>()
                    {
                        Normal   = new Color("#000C2BFF"),
                        Selected = new Color("#000C2BFF"),
                        Pressed  = new Color("#1473E6FF"),
                        Disabled = new Color("#C3CAD2FF"),
                    },
                },
                TopLine = new ViewStyle()
                {
                    Size            = new Size(-1, 1),
                    BackgroundColor = new Selector <Color>()
                    {
                        Normal   = new Color("#000C2BFF"),
                        Selected = new Color("#000C2BFF"),
                        Pressed  = new Color("#1473E6FF"),
                        Disabled = new Color("#C3CAD2FF"),
                    },
                },
                BottomLine = new ViewStyle()
                {
                    Size            = new Size(-1, 8),
                    Position        = new Position(0, 76), // 84 - 8
                    BackgroundColor = new Selector <Color>()
                    {
                        Normal   = Color.Transparent,
                        Selected = new Color("#000C2BFF"),
                        Pressed  = new Color("#1473E6FF"),
                        Disabled = Color.Transparent,
                    },
                },
            });

            theme.AddStyleWithoutClone("NotificationToast", new TextLabelStyle()
            {
                BackgroundImage        = FrameworkInformation.ResourcePath + "IoT_Toast_1.png",
                BackgroundImageBorder  = new Rectangle(28, 28, 28, 28),
                TextColor              = new Color("#000C2B"),
                PixelSize              = 32,
                WidthResizePolicy      = ResizePolicyType.UseNaturalSize,
                HeightResizePolicy     = ResizePolicyType.UseNaturalSize,
                PositionUsesPivotPoint = true,
                HorizontalAlignment    = HorizontalAlignment.Center,
                VerticalAlignment      = VerticalAlignment.Center,
                Padding   = new Extents(40, 40, 24, 24),
                PositionY = 120,
            });

            return(theme);
        }
Esempio n. 5
0
        public Theme Create()
        {
            var theme = new Theme()
            {
                Id = "Tizen.NUI.Theme.Common"
            };

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Button", new ButtonStyle()
            {
                Size            = new Size(100, 45),
                BackgroundColor = new Selector <Color>()
                {
                    Normal   = new Color(0.88f, 0.88f, 0.88f, 1),
                    Pressed  = new Color(0.77f, 0.77f, 0.77f, 1),
                    Disabled = new Color(0.88f, 0.88f, 0.88f, 1),
                },
                Text = new TextLabelStyle()
                {
                    PointSize = 12,
                    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),
                    }
                }
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.CheckBox", new ButtonStyle()
            {
                Size = new Size(30, 30),
                Icon = new ImageViewStyle()
                {
                    Opacity = new Selector <float?>()
                    {
                        Normal   = 1.0f,
                        Disabled = 0.4f,
                        Selected = 1.0f,
                    },
                    BackgroundImage = new Selector <string>()
                    {
                        Pressed  = FrameworkInformation.ResourcePath + "nui_component_default_checkbox_bg_p.png",
                        Selected = FrameworkInformation.ResourcePath + "nui_component_default_checkbox_bg_p.png",
                        Other    = FrameworkInformation.ResourcePath + "nui_component_default_checkbox_bg_n.png",
                    },
                    ResourceUrl = new Selector <string>()
                    {
                        Pressed  = "",
                        Selected = FrameworkInformation.ResourcePath + "nui_component_default_checkbox_s.png",
                        Other    = "",
                    },
                },
                Text = new TextLabelStyle()
                {
                    PointSize = 12,
                    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),
                    }
                }
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Popup", new PopupStyle()
            {
                Size            = new Size(500, 280),
                BackgroundColor = new Color(0.9f, 0.9f, 0.9f, 1),
                ImageShadow     = new ImageShadow()
                {
                    Url     = FrameworkInformation.ResourcePath + "nui_component_default_popup_shadow.png",
                    Border  = new Rectangle(24, 24, 24, 24),
                    Extents = new Vector2(48, 48)
                },
                Title = new TextLabelStyle()
                {
                    PointSize = 16,
                    Padding   = new Extents(20, 20, 20, 20),
                },
                Buttons = new ButtonStyle()
                {
                    Size            = new Size(0, 80),
                    BackgroundColor = new Selector <Color>()
                    {
                        Normal  = new Color(1, 1, 1, 1),
                        Pressed = new Color(1, 1, 1, 0.5f),
                    },
                    Overlay = new ImageViewStyle()
                    {
                        BackgroundColor = new Selector <Color>()
                        {
                            Pressed = new Color(0, 0, 0, 0.1f),
                            Other   = new Color(1, 1, 1, 1),
                        },
                    },
                    Text = new TextLabelStyle()
                    {
                        TextColor = new Color(0.05f, 0.63f, 0.9f, 1),
                    }
                }
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Progress", new ProgressStyle()
            {
                Size  = new Size(200, 5),
                Track = new ImageViewStyle()
                {
                    BackgroundColor = new Color(0, 0, 0, 0.1f),
                },
                Buffer = new ImageViewStyle()
                {
                    BackgroundColor = new Color(0.05f, 0.63f, 0.9f, 0.3f),
                },
                Progress = new ImageViewStyle()
                {
                    BackgroundColor = new Color(0.05f, 0.63f, 0.9f, 1),
                },
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.RadioButton", new ButtonStyle()
            {
                Size = new Size(30, 30),
                Icon = new ImageViewStyle()
                {
                    Opacity = new Selector <float?>()
                    {
                        Normal   = 1.0f,
                        Disabled = 0.4f,
                        Selected = 1.0f,
                    },
                    BackgroundImage = new Selector <string>()
                    {
                        Pressed  = FrameworkInformation.ResourcePath + "nui_component_default_radiobutton_p.png",
                        Selected = FrameworkInformation.ResourcePath + "nui_component_default_radiobutton_s.png",
                        Other    = FrameworkInformation.ResourcePath + "nui_component_default_radiobutton_n.png",
                    }
                },
                Text = new TextLabelStyle()
                {
                    PointSize = 12,
                    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),
                    }
                }
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Slider", 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     = FrameworkInformation.ResourcePath + "nui_component_default_slider_thumb_n.png",
                    BackgroundImage = new Selector <string>()
                    {
                        Normal  = "",
                        Pressed = FrameworkInformation.ResourcePath + "nui_component_default_slider_thumb_bg_p.png",
                    }
                },
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Switch", new SwitchStyle()
            {
                Size  = new Size(96, 60),
                Track = new ImageViewStyle()
                {
                    Size        = new Size(96, 60),
                    ResourceUrl = new Selector <string>()
                    {
                        Normal           = FrameworkInformation.ResourcePath + "nui_component_default_switch_track_n.png",
                        Selected         = FrameworkInformation.ResourcePath + "nui_component_default_switch_track_s.png",
                        Disabled         = FrameworkInformation.ResourcePath + "nui_component_default_switch_track_d.png",
                        DisabledSelected = FrameworkInformation.ResourcePath + "nui_component_default_switch_track_ds.png",
                    }
                },
                Thumb = new ImageViewStyle()
                {
                    Size        = new Size(60, 60),
                    ResourceUrl = new Selector <string>()
                    {
                        Normal   = FrameworkInformation.ResourcePath + "nui_component_default_switch_thumb_n.png",
                        Disabled = FrameworkInformation.ResourcePath + "nui_component_default_switch_thumb_d.png",
                        Selected = FrameworkInformation.ResourcePath + "nui_component_default_switch_thumb_n.png",
                    }
                },
                Text = new TextLabelStyle()
                {
                    PointSize = 12,
                    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),
                    }
                }
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Tab", new TabStyle()
            {
                Size            = new Size(480, 80),
                BackgroundColor = Color.Yellow,
                UnderLine       = new ViewStyle()
                {
                    Size            = new Size(0, 6),
                    BackgroundColor = new Color(0.05f, 0.63f, 0.9f, 1),
                },
                Text = new TextLabelStyle()
                {
                    PointSize = 16,
                    TextColor = new Selector <Color>()
                    {
                        Normal   = Color.Black,
                        Selected = new Color(0.05f, 0.63f, 0.9f, 1),
                    }
                }
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Toast", new ToastStyle()
            {
                Size            = new Size(480, 80),
                BackgroundColor = new Color(0, 0, 0, 0.8f),
                Text            = new TextLabelStyle()
                {
                    Padding = new Extents(12, 12, 8, 8)
                }
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Loading", new LoadingStyle()
            {
                LoadingSize = new Size(100, 100),
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Pagination", new PaginationStyle()
            {
                IndicatorImageUrl = new Selector <string>()
                {
                    Normal   = FrameworkInformation.ResourcePath + "nui_component_default_pagination_normal_dot.png",
                    Selected = FrameworkInformation.ResourcePath + "nui_component_default_pagination_focus_dot.png",
                }
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Scrollbar", new ScrollbarStyle()
            {
                TrackThickness = 6,
                ThumbThickness = 6,
                TrackColor     = new Color(1, 1, 1, 0.15f),
                ThumbColor     = new Color(0.6f, 0.6f, 0.6f, 1),
                TrackPadding   = 4
            });

            return(theme);
        }
Esempio n. 6
0
        public Theme Create()
        {
            var theme = new Theme()
            {
                Id      = Tizen.NUI.DefaultThemeCreator.DefaultId,
                Version = Tizen.NUI.DefaultThemeCreator.DefaultVersion
            };

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Popup", new PopupStyle()
            {
                Size            = new Size(500, 280),
                BackgroundColor = new Color(0.9f, 0.9f, 0.9f, 1),
                ImageShadow     = new ImageShadow()
                {
                    Url     = FrameworkInformation.ResourcePath + "nui_component_default_popup_shadow.png",
                    Border  = new Rectangle(24, 24, 24, 24),
                    Extents = new Vector2(48, 48)
                },
                Title = new TextLabelStyle()
                {
                    PointSize = 16,
                    Padding   = new Extents(20, 20, 20, 20),
                },
                Buttons = new ButtonStyle()
                {
                    Size            = new Size(0, 80),
                    BackgroundColor = new Selector <Color>()
                    {
                        Normal  = new Color(1, 1, 1, 1),
                        Pressed = new Color(1, 1, 1, 0.5f),
                    },
                    Overlay = new ImageViewStyle()
                    {
                        BackgroundColor = new Selector <Color>()
                        {
                            Pressed = new Color(0, 0, 0, 0.1f),
                            Other   = new Color(1, 1, 1, 1),
                        },
                    },
                    Text = new TextLabelStyle()
                    {
                        TextColor = new Color(0.05f, 0.63f, 0.9f, 1),
                    }
                }
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Progress", new ProgressStyle()
            {
                Size  = new Size(200, 5),
                Track = new ImageViewStyle()
                {
                    BackgroundColor = new Color(0, 0, 0, 0.1f),
                },
                Buffer = new ImageViewStyle()
                {
                    BackgroundColor = new Color(0.05f, 0.63f, 0.9f, 0.3f),
                },
                Progress = new ImageViewStyle()
                {
                    BackgroundColor = new Color(0.05f, 0.63f, 0.9f, 1),
                },
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Slider", 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     = FrameworkInformation.ResourcePath + "nui_component_default_slider_thumb_n.png",
                    BackgroundImage = new Selector <string>()
                    {
                        Normal  = "",
                        Pressed = FrameworkInformation.ResourcePath + "nui_component_default_slider_thumb_bg_p.png",
                    }
                },
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Tab", new TabStyle()
            {
                Size            = new Size(480, 80),
                BackgroundColor = Color.Yellow,
                UnderLine       = new ViewStyle()
                {
                    Size            = new Size(0, 6),
                    BackgroundColor = new Color(0.05f, 0.63f, 0.9f, 1),
                },
                Text = new TextLabelStyle()
                {
                    PointSize = 16,
                    TextColor = new Selector <Color>()
                    {
                        Normal   = Color.Black,
                        Selected = new Color(0.05f, 0.63f, 0.9f, 1),
                    }
                }
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Toast", new ToastStyle()
            {
                Size            = new Size(480, 80),
                BackgroundColor = new Color(0, 0, 0, 0.8f),
                Text            = new TextLabelStyle()
                {
                    Padding = new Extents(12, 12, 8, 8)
                }
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Pagination", new PaginationStyle()
            {
                IndicatorImageUrl = new Selector <string>()
                {
                    Normal   = FrameworkInformation.ResourcePath + "nui_component_default_pagination_normal_dot.png",
                    Selected = FrameworkInformation.ResourcePath + "nui_component_default_pagination_focus_dot.png",
                }
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Scrollbar", new ScrollbarStyle()
            {
                TrackThickness = 6,
                ThumbThickness = 6,
                TrackColor     = new Color(1, 1, 1, 0.15f),
                ThumbColor     = new Color(0.6f, 0.6f, 0.6f, 1),
                TrackPadding   = 4
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Button", new ButtonStyle()
            {
                Size            = new Size(210, 72),
                CornerRadius    = 36,
                BackgroundColor = new Selector <Color>()
                {
                    Normal   = new Color(0, 0.1647f, 0.3019f, 0.85f),
                    Pressed  = new Color(0, 0.2475f, 0.5019f, 0.85f),
                    Disabled = new Color(0.2392f, 0.2392f, 0.2392f, 0.85f),
                },
                Opacity = new Selector <float?>()
                {
                    Other    = 1.0f,
                    Disabled = 0.3f,
                },
                Text = new TextLabelStyle()
                {
                    FontFamily          = "SamsungOne 700",
                    PixelSize           = 28,
                    Padding             = new Extents(20, 20, 0, 0),
                    HorizontalAlignment = HorizontalAlignment.Center,
                    VerticalAlignment   = VerticalAlignment.Center,
                    TextColor           = new Selector <Color>()
                    {
                        Normal   = new Color(0.2196f, 0.6131f, 0.9882f, 1),
                        Disabled = new Color(1, 1, 1, 0.35f),
                    }
                }
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.CheckBox", new LottieButtonStyle()
            {
                LottieUrl = FrameworkInformation.ResourcePath + "nui_wearable_checkbox_icon.png",
                PlayRange = new Selector <LottieFrameInfo>()
                {
                    Selected = new LottieFrameInfo(19, 36),
                    Normal   = new LottieFrameInfo(0, 18)
                },
                Opacity = new Selector <float?>()
                {
                    Other    = 1.0f,
                    Pressed  = 0.6f,
                    Disabled = 0.3f,
                },
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.RadioButton", new LottieButtonStyle()
            {
                LottieUrl = FrameworkInformation.ResourcePath + "nui_wearable_radiobutton_icon.png",
                PlayRange = new Selector <LottieFrameInfo>()
                {
                    Selected = new LottieFrameInfo(0, 12),
                    Normal   = new LottieFrameInfo(13, 25)
                },
                Opacity = new Selector <float?>()
                {
                    Other    = 1.0f,
                    Pressed  = 0.6f,
                    Disabled = 0.3f,
                },
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Switch", new LottieSwitchStyle()
            {
                LottieUrl = FrameworkInformation.ResourcePath + "nui_wearable_switch_icon.png",
                PlayRange = new Selector <LottieFrameInfo>()
                {
                    Selected = new LottieFrameInfo(0, 18),
                    Normal   = new LottieFrameInfo(19, 36)
                },
                Opacity = new Selector <float?>()
                {
                    Other    = 1.0f,
                    Pressed  = 0.6f,
                    Disabled = 0.3f,
                },
            });

            theme.AddStyleWithoutClone("Tizen.NUI.Components.Loading", new LoadingStyle()
            {
                LoadingSize = new Size(360, 360),
            });

            return(theme);
        }
Esempio n. 7
0
        public Theme Create()
        {
            var theme = new Theme()
            {
                Id      = Tizen.NUI.DefaultThemeCreator.DefaultId,
                Version = Tizen.NUI.DefaultThemeCreator.DefaultVersion
            };

            // Button base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.Button", new ButtonStyle()
            {
                Size                    = new Size(252, 48),
                ItemSpacing             = new Size2D(8, 8),
                CornerRadius            = 12.0f,
                ItemHorizontalAlignment = HorizontalAlignment.Center,
                ItemVerticalAlignment   = VerticalAlignment.Center,
                BackgroundColor         = new Selector <Color>()
                {
                    Normal   = new Color(1.0f, 0.384f, 0.0f, 1),
                    Pressed  = new Color(0.85f, 0.325f, 0.0f, 1),
                    Focused  = new Color(1.0f, 0.827f, 0.624f, 1),
                    Selected = new Color(0.624f, 0.239f, 0.0f, 1),
                    Disabled = new Color(0.792f, 0.792f, 0.792f, 1),
                },
                Text = new TextLabelStyle()
                {
                    TextColor = new Color("#FDFDFD"),
                    PixelSize = 24,
                }
            });

            // CheckBox base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.CheckBox", new ButtonStyle()
            {
                ItemSpacing             = new Size2D(16, 16),
                ItemHorizontalAlignment = HorizontalAlignment.Center,
                ItemVerticalAlignment   = VerticalAlignment.Center,
                Icon = new ImageViewStyle()
                {
                    Size        = new Size(32, 32),
                    ResourceUrl = new Selector <string>()
                    {
                        Normal           = FrameworkInformation.ResourcePath + "IoT_check_off.png",
                        Pressed          = FrameworkInformation.ResourcePath + "IoT_check_off_p.png",
                        Disabled         = FrameworkInformation.ResourcePath + "IoT_check_off_d.png",
                        Focused          = FrameworkInformation.ResourcePath + "IoT_check_off_f.png",
                        Selected         = FrameworkInformation.ResourcePath + "IoT_check_on.png",
                        SelectedPressed  = FrameworkInformation.ResourcePath + "IoT_check_on_p.png",
                        SelectedFocused  = FrameworkInformation.ResourcePath + "IoT_check_on_f.png",
                        DisabledSelected = FrameworkInformation.ResourcePath + "IoT_check_on_d.png",
                    },
                },
                Text = new TextLabelStyle()
                {
                    TextColor = new Color("#001447"),
                    PixelSize = 32,
                }
            });

            // Popup base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.Popup", new PopupStyle()
            {
                Size            = new Size(500, 280),
                BackgroundColor = new Color(0.9f, 0.9f, 0.9f, 1),
                ImageShadow     = new ImageShadow()
                {
                    Url     = FrameworkInformation.ResourcePath + "nui_component_default_popup_shadow.png",
                    Border  = new Rectangle(24, 24, 24, 24),
                    Extents = new Vector2(48, 48)
                },
                Title = new TextLabelStyle()
                {
                    PointSize = 16,
                    Padding   = new Extents(20, 20, 20, 20),
                },
                Buttons = new ButtonStyle()
                {
                    Size            = new Size(0, 80),
                    CornerRadius    = 0,
                    BackgroundColor = new Selector <Color>()
                    {
                        Normal  = new Color(1, 1, 1, 1),
                        Pressed = new Color(1, 1, 1, 0.5f),
                    },
                    Overlay = new ImageViewStyle()
                    {
                        BackgroundColor = new Selector <Color>()
                        {
                            Pressed = new Color(0, 0, 0, 0.1f),
                            Other   = new Color(1, 1, 1, 0.1f),
                        },
                    },
                    Text = new TextLabelStyle()
                    {
                        TextColor = new Color(0.05f, 0.63f, 0.9f, 1),
                    }
                }
            });

            // Progress base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.Progress", new ProgressStyle()
            {
                Size  = new Size(508, 16),
                Track = new ImageViewStyle()
                {
                    CornerRadius    = 8.0f,
                    BackgroundColor = new Selector <Color>()
                    {
                        Normal   = new Color(0.82f, 0.31f, 0.0f, 0.1f),
                        Disabled = new Color(0.82f, 0.31f, 0.0f, 0.1f),
                    },
                },
                Buffer = new ImageViewStyle()
                {
                    CornerRadius    = 8.0f,
                    BackgroundColor = new Color(0.82f, 0.31f, 0.0f, 0.1f),
                },
                Progress = new ImageViewStyle()
                {
                    CornerRadius    = 8.0f,
                    BackgroundColor = new Color("#D25000"),
                },
                IndeterminateImageUrl = FrameworkInformation.ResourcePath + "IoT_progress_indeterminate.png",
            });

            // RadioButton base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.RadioButton", new ButtonStyle()
            {
                ItemSpacing             = new Size2D(32, 32),
                ItemHorizontalAlignment = HorizontalAlignment.Begin,
                ItemVerticalAlignment   = VerticalAlignment.Center,
                Icon = new ImageViewStyle()
                {
                    Size        = new Size(36, 36),
                    ResourceUrl = new Selector <string>()
                    {
                        Normal           = FrameworkInformation.ResourcePath + "IoT_radiobutton_off.png",
                        Pressed          = FrameworkInformation.ResourcePath + "IoT_radiobutton_off_p.png",
                        Disabled         = FrameworkInformation.ResourcePath + "IoT_radiobutton_off_d.png",
                        Focused          = FrameworkInformation.ResourcePath + "IoT_radiobutton_off_f.png",
                        Selected         = FrameworkInformation.ResourcePath + "IoT_radiobutton_on.png",
                        SelectedPressed  = FrameworkInformation.ResourcePath + "IoT_radiobutton_on_p.png",
                        SelectedFocused  = FrameworkInformation.ResourcePath + "IoT_radiobutton_on_f.png",
                        DisabledSelected = FrameworkInformation.ResourcePath + "IoT_radiobutton_on_d.png",
                    },
                },
                Text = new TextLabelStyle()
                {
                    TextColor = new Color("#001447"),
                    PixelSize = 32,
                }
            });

            // Slider base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.Slider", new SliderStyle()
            {
                Size           = new Size(850, 50),
                TrackThickness = 8,
                Track          = new ImageViewStyle()
                {
                    Size            = new Size(800, 8),
                    CornerRadius    = 4.0f,
                    BackgroundColor = new Selector <Color>()
                    {
                        Normal   = new Color(1.0f, 0.37f, 0.0f, 0.1f),
                        Disabled = new Color(1.0f, 0.37f, 0.0f, 0.1f),
                    },
                },
                Progress = new ImageViewStyle()
                {
                    Size            = new Size(800, 8),
                    CornerRadius    = 4.0f,
                    BackgroundColor = new Selector <Color>()
                    {
                        Normal   = new Color("#FF6200"),
                        Disabled = new Color("#CACACA"),
                    },
                },
                Thumb = new ImageViewStyle()
                {
                    Size        = new Size(40, 40),
                    ResourceUrl = new Selector <string>()
                    {
                        Normal   = FrameworkInformation.ResourcePath + "IoT_slider_handler_normal.png",
                        Pressed  = FrameworkInformation.ResourcePath + "IoT_slider_handler_pressed.png",
                        Focused  = FrameworkInformation.ResourcePath + "IoT_slider_handler_pressed.png",
                        Disabled = FrameworkInformation.ResourcePath + "IoT_slider_handler_disabled.png",
                    },
                },
                ValueIndicatorImage = new ImageViewStyle()
                {
                    Size            = new Size(16, 24),
                    BorderlineWidth = 0.5f,
                    BorderlineColor = new Color("#FF6200"),
                    BackgroundColor = new Color(0.0f, 0.04f, 0.16f, 1.0f),
                },
            });

            // Switch base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.Switch", new SwitchStyle()
            {
                ItemSpacing             = new Size2D(32, 32),
                ItemHorizontalAlignment = HorizontalAlignment.Begin,
                ItemVerticalAlignment   = VerticalAlignment.Center,
                Track = new ImageViewStyle()
                {
                    Size        = new Size(84, 44),
                    ResourceUrl = new Selector <string>()
                    {
                        Normal           = FrameworkInformation.ResourcePath + "IoT_switch_track_off.png",
                        Pressed          = FrameworkInformation.ResourcePath + "IoT_switch_track_off_p.png",
                        Disabled         = FrameworkInformation.ResourcePath + "IoT_switch_track_off_d.png",
                        Focused          = FrameworkInformation.ResourcePath + "IoT_switch_track_off_f.png",
                        Selected         = FrameworkInformation.ResourcePath + "IoT_switch_track_on.png",
                        SelectedPressed  = FrameworkInformation.ResourcePath + "IoT_switch_track_on_p.png",
                        SelectedFocused  = FrameworkInformation.ResourcePath + "IoT_switch_track_on_f.png",
                        DisabledSelected = FrameworkInformation.ResourcePath + "IoT_switch_track_on_d.png",
                    },
                },
                Thumb = new ImageViewStyle()
                {
                    Size        = new Size(44, 44),
                    ResourceUrl = new Selector <string>()
                    {
                        Normal          = FrameworkInformation.ResourcePath + "IoT_switch_thumb.png",
                        Disabled        = FrameworkInformation.ResourcePath + "IoT_switch_thumb_d.png",
                        Selected        = FrameworkInformation.ResourcePath + "IoT_switch_thumb_s.png",
                        SelectedPressed = FrameworkInformation.ResourcePath + "IoT_switch_thumb_sp.png",
                        SelectedFocused = FrameworkInformation.ResourcePath + "IoT_switch_thumb_sf.png",
                    }
                },
                Text = new TextLabelStyle()
                {
                    TextColor = new Color("#001447"),
                    PixelSize = 32,
                }
            });

            // Loading base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.Loading", new LoadingStyle()
            {
                LoadingSize = new Size(200, 200),
            });

            // Pagination base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.Pagination", new PaginationStyle()
            {
                IndicatorImageUrl = new Selector <string>()
                {
                    Normal   = FrameworkInformation.ResourcePath + "nui_component_default_pagination_normal_dot.png",
                    Selected = FrameworkInformation.ResourcePath + "nui_component_default_pagination_focus_dot.png",
                },
                IndicatorSize = new Size(10, 10),
            });

            // Scrollbar base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.Scrollbar", new ScrollbarStyle()
            {
                TrackThickness = 8,
                ThumbThickness = 8,
                TrackColor     = new Color(0f, 0f, 0f, 0f),
                ThumbColor     = new Color("#FFFEFE"),
                TrackPadding   = 4,
                //7.0 UX no require image resource.
                Thumb = new ImageViewStyle()
                {
                    CornerRadius = 4.0f,
                    BoxShadow    = new Shadow(8.0f, new Color(0.0f, 0.0f, 0.0f, 0.16f), new Vector2(0.0f, 2.0f)),
                }
                //ThumbVerticalImageUrl = FrameworkInformation.ResourcePath + "nui_component_default_scroll_vbar.#.png",
                //ThumbHorizontalImageUrl = FrameworkInformation.ResourcePath + "nui_component_default_scroll_hbar.#.png",
            });

            // LinearLayouter base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.LinearLayouter", new ViewStyle()
            {
                Padding = new Extents(0, 0, 0, 0)
            });

            // GridLayouter base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.GridLayouter", new ViewStyle()
            {
                Padding = new Extents(0, 0, 0, 0),
            });

            // ItemsLayouter base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.ItemsLayouter", new ViewStyle()
            {
                Padding = new Extents(0, 0, 0, 0),
            });

            // RecyclerViewItem base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.RecyclerViewItem", new RecyclerViewItemStyle()
            {
                BackgroundColor = new Selector <Color>()
                {
                    Normal   = new Color(1, 1, 1, 1),
                    Pressed  = new Color(0.85f, 0.85f, 0.85f, 1),
                    Disabled = new Color(0.70f, 0.70f, 0.70f, 1),
                    Selected = new Color(0.701f, 0.898f, 0.937f, 1),
                },
            });

            // DefaultLinearItem base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.DefaultLinearItem", new DefaultLinearItemStyle()
            {
                SizeHeight = 64,
                Padding    = new Extents(20, 20, 0, 0),
                Margin     = new Extents(0, 0, 0, 0),
                Label      = new TextLabelStyle()
                {
                    PixelSize  = 24,
                    Ellipsis   = true,
                    FontFamily = "SamsungOneUI600",
                    TextColor  = new Selector <Color>()
                    {
                        Normal   = new Color("#090E21"),
                        Pressed  = new Color("#FF6200"),
                        Disabled = new Color("#CACACA"),
                        Selected = new Color("#FF6200"),
                    },
                    ThemeChangeSensitive = false
                },
                SubLabel = new TextLabelStyle()
                {
                    PixelSize  = 20,
                    Ellipsis   = true,
                    FontFamily = "SamsungOneUI400",
                    TextColor  = new Selector <Color>()
                    {
                        Normal   = new Color("#090E21"),
                        Pressed  = new Color("#FF6200"),
                        Disabled = new Color("#CACACA"),
                        Selected = new Color("#FF6200"),
                    },
                    ThemeChangeSensitive = false
                },
                Icon = new ViewStyle()
                {
                    Margin = new Extents(0, 24, 0, 0)
                },
                Extra = new ViewStyle()
                {
                    Margin = new Extents(24, 0, 0, 0)
                },
            });

            // DefaultGridItem base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.DefaultGridItem", new DefaultGridItemStyle()
            {
                ClippingMode    = ClippingModeType.ClipChildren,
                Padding         = new Extents(0, 0, 0, 0),
                Margin          = new Extents(5, 5, 5, 5),
                CornerRadius    = 12.0f,
                BackgroundColor = new Selector <Color>()
                {
                    Normal   = new Color("#FAFAFA"),
                    Pressed  = new Color(1f, 0.38f, 0, 0.2f),
                    Disabled = new Color("#FAFAFA"),
                    Selected = new Color(1f, 0.38f, 0, 0.2f),
                },
                Image = new ImageViewStyle()
                {
                    //FIXME: Clip mode is not working on CornerRadius.
                    CornerRadius = 12.0f,
                    ClippingMode = ClippingModeType.ClipChildren,
                },
                Label = new TextLabelStyle()
                {
                    SizeHeight   = 24,
                    PixelSize    = 16,
                    FontFamily   = "SamsungOneUI400",
                    LineWrapMode = LineWrapMode.Character,
                    TextColor    = new Selector <Color>()
                    {
                        Normal   = new Color("#090E21"),
                        Pressed  = new Color("#FF6200"),
                        Disabled = new Color("#CACACA"),
                        Selected = new Color("#FF6200"),
                    },
                    ThemeChangeSensitive = false
                },
                Badge = new ViewStyle()
                {
                    Margin = new Extents(0, 0, 0, 0),
                },
                BoxShadow = new Shadow(12.0f, new Color(0.0f, 0.0f, 0.0f, 0.16f), new Vector2(0.0f, 4.0f)),
            });

            // DefaultTitleItem base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.DefaultTitleItem", new DefaultTitleItemStyle()
            {
                SizeHeight      = 48,
                Padding         = new Extents(20, 20, 0, 0),
                Margin          = new Extents(0, 0, 0, 0),
                BackgroundColor = Color.Transparent,
                Label           = new TextLabelStyle()
                {
                    PixelSize            = 24,
                    Ellipsis             = true,
                    FontFamily           = "SamsungOneUI400",
                    TextColor            = new Color("#090E217F"),
                    ThemeChangeSensitive = false
                },
                Icon = new ViewStyle()
                {
                    Margin = new Extents(24, 0, 0, 0)
                },
                Seperator = new ViewStyle()
                {
                    Margin          = new Extents(0, 0, 0, 0),
                    BackgroundColor = new Color(0, 0, 0, 0),
                },
            });

            // ContentPage base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.ContentPage", new ViewStyle()
            {
                BackgroundColor    = new Color("#FAFAFA"),
                CornerRadius       = new Vector4(24.0f, 24.0f, 24.0f, 24.0f),
                CornerRadiusPolicy = VisualTransformPolicyType.Absolute,
                BoxShadow          = new Shadow(8.0f, new Color(0.0f, 0.0f, 0.0f, 0.16f), new Vector2(0.0f, 2.0f)),
            });

            // AppBar base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.AppBar", new AppBarStyle()
            {
                Size            = new Size(-1, 64),
                BackgroundColor = Color.Transparent,
                BackButton      = new ButtonStyle()
                {
                    Size            = new Size(48, 48),
                    CornerRadius    = 0,
                    BackgroundColor = Color.Transparent,
                    Icon            = new ImageViewStyle()
                    {
                        Size        = new Size(48, 48),
                        ResourceUrl = FrameworkInformation.ResourcePath + "nui_component_default_back_button.png",
                        Color       = new Selector <Color>()
                        {
                            Normal   = new Color("#17234D"),
                            Focused  = new Color("#17234D"),
                            Pressed  = new Color("#FF6200"),
                            Disabled = new Color("#CACACA"),
                        },
                    },
                    ThemeChangeSensitive = false
                },
                TitleTextLabel = new TextLabelStyle()
                {
                    PixelSize         = 24,
                    VerticalAlignment = VerticalAlignment.Center,
                    TextColor         = new Selector <Color>()
                    {
                        Normal = new Color("#17234D"),
                    },
                    ThemeChangeSensitive = false
                },
                ActionView = new ViewStyle()
                {
                    Size            = new Size(48, 64),
                    CornerRadius    = 0,
                    BackgroundColor = Color.Transparent,
                },
                ActionButton = new ButtonStyle()
                {
                    Size            = new Size(-2, 64),
                    CornerRadius    = 0,
                    BackgroundColor = Color.Transparent,
                    Text            = new TextLabelStyle()
                    {
                        PixelSize = 24,
                        TextColor = new Selector <Color>()
                        {
                            Normal   = new Color("#FF6200"),
                            Focused  = new Color("#FF6200"),
                            Pressed  = new Color("#D95300"),
                            Disabled = new Color("#CACACA"),
                        },
                    },
                    Icon = new ImageViewStyle()
                    {
                        Size  = new Size(48, 48),
                        Color = new Selector <Color>()
                        {
                            Normal   = new Color("#17234D"),
                            Focused  = new Color("#17234D"),
                            Pressed  = new Color("#FF6200"),
                            Disabled = new Color("#CACACA"),
                        },
                    },
                    ThemeChangeSensitive = false,
                },
                Padding           = new Extents(16, 16, 0, 0),
                NavigationPadding = new Extents(0, 8, 0, 0),
                ActionPadding     = new Extents(16, 0, 0, 0),
                ActionCellPadding = new Size2D(16, 0),
            });

            // Picker base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.Picker", new PickerStyle()
            {
                Size          = new Size(160, 339),
                ItemTextLabel = new TextLabelStyle()
                {
                    //FIXME: Should be check PointSize. given size from UX is too large.
                    PixelSize           = 32,
                    VerticalAlignment   = VerticalAlignment.Center,
                    HorizontalAlignment = HorizontalAlignment.Center,
                    Size      = new Size(0, 72),
                    TextColor = new Selector <Color>()
                    {
                        Normal = new Color("#000C2B"),
                    },
                    BackgroundColor = Color.White,
                },
                Divider = new ViewStyle()
                {
                    SizeHeight        = 2.0f,
                    WidthResizePolicy = ResizePolicyType.FillToParent,
                    Position          = new Position(0, 132),
                    BackgroundColor   = new Color("#0A0E4A"),
                },
                StartScrollOffset = new Size(0, 12),
            });

            // TabBar base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.TabBar", new ViewStyle()
            {
                Size               = new Size(-1, -2),
                Margin             = new Extents(16, 16, 0, 0),
                Padding            = new Extents(14, 14, 0, 0),
                CornerRadius       = new Vector4(12.0f, 12.0f, 12.0f, 12.0f),
                CornerRadiusPolicy = VisualTransformPolicyType.Absolute,
                BoxShadow          = new Shadow(8.0f, new Color(0.0f, 0.0f, 0.0f, 0.16f), new Vector2(0.0f, 2.0f)),
                BackgroundColor    = new Color("#FAFAFA"),
            });

            // TabButton base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.TabButton", new TabButtonStyle()
            {
                Size                 = new Size(-1, 116),
                SizeWithTextOnly     = new Size(-1, 72),
                SizeWithIconOnly     = new Size(-1, 64),
                MinimumSize          = new Size(100, -1),
                Padding              = new Extents(24, 24, 18, 16),
                PaddingWithTextOnly  = new Extents(24, 24, 20, 20),
                PaddingWithIconOnly  = new Extents(24, 24, 16, 16),
                ItemSpacing          = new Size2D(0, 10),
                CornerRadius         = 0,
                IconSizeWithIconOnly = new Size(32, 32),
                BackgroundColor      = new Selector <Color>()
                {
                    Normal   = new Color("#FAFAFA"),
                    Selected = new Color("#FFE0CC"),
                    Pressed  = new Color("#FFCAA8"),
                    Focused  = new Color("#FAFAFA"),
                    Disabled = new Color("#FAFAFA"),
                },
                Text = new TextLabelStyle()
                {
                    PixelSize = 28,
                    Size      = new Size(-2, -2),
                    TextColor = new Selector <Color>()
                    {
                        Normal   = new Color("#090E21"),
                        Selected = new Color("#FF6200"),
                        Pressed  = new Color("#FF6200"),
                        Focused  = new Color("#FF6200"),
                        Disabled = new Color("#CACACA"),
                    },
                    ThemeChangeSensitive = false,
                },
                Icon = new ImageViewStyle()
                {
                    Size  = new Size(48, 48),
                    Color = new Selector <Color>()
                    {
                        Normal   = new Color("#090E21"),
                        Selected = new Color("#FF6200"),
                        Pressed  = new Color("#FF6200"),
                        Focused  = new Color("#FF6200"),
                        Disabled = new Color("#CACACA"),
                    },
                },
            });

            // NotificationToast base style
            theme.AddStyleWithoutClone("NotificationToast", new TextLabelStyle()
            {
                BackgroundColor        = new Color("#FAFAFA"),
                CornerRadius           = 12.0f,
                BoxShadow              = new Shadow(8.0f, new Color(0.0f, 0.0f, 0.0f, 0.16f), new Vector2(0.0f, 2.0f)),
                TextColor              = new Color("#090E21"),
                PixelSize              = 32,
                WidthResizePolicy      = ResizePolicyType.UseNaturalSize,
                HeightResizePolicy     = ResizePolicyType.UseNaturalSize,
                PositionUsesPivotPoint = true,
                HorizontalAlignment    = HorizontalAlignment.Center,
                VerticalAlignment      = VerticalAlignment.Center,
                Padding   = new Extents(16, 16, 16, 16),
                PositionY = 120,
            });

            // AlertDialog base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.AlertDialog", new AlertDialogStyle()
            {
                Size            = new Size(-2, -2),
                Padding         = new Extents(32, 32, 32, 32),
                ItemSpacing     = new Size2D(0, 32),
                BackgroundColor = new Color("#FAFAFA"),
                CornerRadius    = 12.0f,
                BoxShadow       = new Shadow(8.0f, new Color(0.0f, 0.0f, 0.0f, 0.16f), new Vector2(0.0f, 2.0f)),
                TitleTextLabel  = new TextLabelStyle()
                {
                    Size                 = new Size(626, -2),
                    PixelSize            = 24,
                    HorizontalAlignment  = HorizontalAlignment.Center,
                    VerticalAlignment    = VerticalAlignment.Center,
                    TextColor            = new Color("#090E21"),
                    ThemeChangeSensitive = false,
                },
                MessageTextLabel = new TextLabelStyle()
                {
                    Size                 = new Size(626, -2),
                    PixelSize            = 24,
                    MultiLine            = true,
                    HorizontalAlignment  = HorizontalAlignment.Center,
                    VerticalAlignment    = VerticalAlignment.Center,
                    TextColor            = new Color("#090E21"),
                    ThemeChangeSensitive = false,
                },
                ActionContent = new ViewStyle()
                {
                    Size = new Size(626, -2),
                },
            });

            // TimePicker base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.TimePicker", new TimePickerStyle()
            {
                CellPadding = new Size(50, 339),

                Pickers = new PickerStyle()
                {
                    Size          = new Size(160, 339),
                    ItemTextLabel = new TextLabelStyle()
                    {
                        //FIXME: Should be check PointSize. given size from UX is too large.
                        PixelSize           = 32,
                        VerticalAlignment   = VerticalAlignment.Center,
                        HorizontalAlignment = HorizontalAlignment.Center,
                        Size                 = new Size(0, 72),
                        TextColor            = new Color("#000C2B"),
                        BackgroundColor      = Color.White,
                        ThemeChangeSensitive = false
                    },
                    Divider = new ViewStyle()
                    {
                        SizeHeight        = 2.0f,
                        WidthResizePolicy = ResizePolicyType.FillToParent,
                        Position          = new Position(0, 132),
                        BackgroundColor   = new Color("#0A0E4A"),
                    },
                    StartScrollOffset = new Size2D(0, 12),
                }
            });

            // DatePicker base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.DatePicker", new DatePickerStyle()
            {
                CellPadding = new Size(50, 339),

                Pickers = new PickerStyle()
                {
                    Size          = new Size(160, 339),
                    ItemTextLabel = new TextLabelStyle()
                    {
                        //FIXME: Should be check PointSize. given size from UX is too large.
                        PixelSize           = 32,
                        VerticalAlignment   = VerticalAlignment.Center,
                        HorizontalAlignment = HorizontalAlignment.Center,
                        Size                 = new Size(0, 72),
                        TextColor            = new Color("#000C2B"),
                        BackgroundColor      = Color.White,
                        ThemeChangeSensitive = false
                    },
                    Divider = new ViewStyle()
                    {
                        SizeHeight        = 2.0f,
                        WidthResizePolicy = ResizePolicyType.FillToParent,
                        Position          = new Position(0, 132),
                        BackgroundColor   = new Color("#0A0E4A"),
                    },
                    StartScrollOffset = new Size2D(0, 12),
                }
            });

            // Menu base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.Menu", new MenuStyle()
            {
                Content = new ViewStyle()
                {
                    BackgroundColor = new Color("#FFFEFE"),
                    CornerRadius    = 24.0f,
                    BoxShadow       = new Shadow(8.0f, new Color(0.0f, 0.0f, 0.0f, 0.16f), new Vector2(0.0f, 2.0f)),
                    // FIXME: ScrollableBase with LinearLayout's Padding.Start is applied both Start and End.
                    //        ScrollableBase with LinearLayout's Padding.Top is applied both Top and Bottom.
                    Padding = new Extents(32, 0, 16, 0),
                },
            });

            // MenuItem base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.MenuItem", new ButtonStyle()
            {
                Size            = new Size(324, -2),
                MinimumSize     = new Size2D(0, 64),
                BackgroundColor = new Color("#FFFEFE"),
                CornerRadius    = 0,
                // FIXME: ClippingModeType.ClipChildren cannot support anti-aliasing
                //        So not to show left bottom corner of MenuItem, MenuItem.Padding.Start is 0 and Menu.Content.Padding.Start is 32.
                //        (instead of MenuItem.Padding.Start 16 and Menu.Content.Padding.Start is 16)
                Padding = new Extents(0, 0, 24, 24),
                Text    = new TextLabelStyle()
                {
                    PixelSize           = 24,
                    MultiLine           = true,
                    HorizontalAlignment = HorizontalAlignment.Begin,
                    VerticalAlignment   = VerticalAlignment.Center,
                    TextColor           = new Selector <Color>()
                    {
                        Normal   = new Color("#090E21"),
                        Focused  = new Color("#FF6200"),
                        Pressed  = new Color("#FF6200"),
                        Disabled = new Color("#CACACA"),
                        Selected = new Color("#FF6200"),
                    },
                    ThemeChangeSensitive = false
                },
                Icon = new ImageViewStyle()
                {
                    Size  = new Size(32, 32),
                    Color = new Selector <Color>()
                    {
                        Normal   = new Color("#090E21"),
                        Focused  = new Color("#FF6200"),
                        Pressed  = new Color("#FF6200"),
                        Disabled = new Color("#CACACA"),
                        Selected = new Color("#FF6200"),
                    },
                },
            });

            // AlertDialog base style
            theme.AddStyleWithoutClone("Tizen.NUI.Components.DialogPage.Scrim", new ViewStyle()
            {
                BackgroundColor = new Color("#090E21"),
                Opacity         = 0.5f,
            });

            return(theme);
        }