private Size thumbSize = null;
// To store the thumb image url of normal state
private string thumbImageUrl = null;
- // To store the thumb image url selector of normal state
- private Selector<string> thumbImageUrlSelector = null;
// To store the thumb color of normal state
private Color thumbColor = Color.White;
// To store the thumb image url of warning state
HeightResizePolicy = ResizePolicyType.Fixed,
ParentOrigin = NUI.ParentOrigin.Center,
PivotPoint = NUI.PivotPoint.Center,
- PositionUsesPivotPoint = true
+ PositionUsesPivotPoint = true,
+ EnableControlState = true
};
if (bgTrackImage != null)
{
else
{
thumbImage.ResourceUrlSelector = value;
- thumbImageUrlSelector = value;
}
}
}
else
{
thumbImage.ResourceUrlSelector = value;
- thumbImageUrlSelector = value;
}
}
}
if (!isFocused && !isPressed)
{
ControlState = ControlState.Normal;
- thumbImage.ResourceUrl = thumbImageUrlSelector?.Normal;
if (stateChangedHandler != null)
{
else if (isPressed)
{
ControlState = ControlState.Pressed;
- thumbImage.ResourceUrl = thumbImageUrlSelector?.Pressed;
if (stateChangedHandler != null)
{
else if (!isPressed && isFocused)
{
ControlState = ControlState.Focused;
- thumbImage.ResourceUrl = thumbImageUrlSelector?.Focused;
if (stateChangedHandler != null)
{
Track = new ImageViewStyle()
{
Size = new Size(100, 8),
- ResourceUrl = new Selector<string>()
+ BorderlineWidth = 0.5f,
+ BorderlineColor = new Color(0.84f, 0.85f, 0.87f, 1.0f),
+ BackgroundColor = new Selector<Color>()
{
- Normal = FrameworkInformation.ResourcePath + "IoT_slider_status_empty_track.png",
- Disabled = FrameworkInformation.ResourcePath + "IoT_slider_status_track_disabled.png",
+ Normal = new Color(1.0f, 1.0f, 1.0f, 0.2f),
+ Disabled = new Color(0.76f, 0.79f, 0.82f, 1),
},
- BackgroundColor = new Color(1.0f, 1.0f, 1.0f, 0.1f),
},
Progress = new ImageViewStyle()
{
Size = new Size(100, 8),
- ResourceUrl = FrameworkInformation.ResourcePath + "IoT_slider_status_track.png",
- BackgroundColor = new Color(0.03f, 0.05f, 0.3f, 1),
+ 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 = FrameworkInformation.ResourcePath + "IoT_slider_handler_normal.png",
- // TODO : Should check later when UX guide provides the pressed image
- /*BackgroundImage = new Selector<string>()
+ ResourceUrl = 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",
- }*/
+ 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()
{
/// <summary> Bindable property of BorderlineColor. Please do not open it. </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty BorderlineColorProperty = BindableProperty.Create(nameof(BorderlineColor), typeof(Vector4), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty BorderlineColorProperty = BindableProperty.Create(nameof(BorderlineColor), typeof(Color), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
{
- ((ViewStyle)bindable).borderlineColor = (Vector4)newValue;
+ ((ViewStyle)bindable).borderlineColor = (Color)newValue;
}, defaultValueCreator: (bindable) => ((ViewStyle)bindable).borderlineColor ?? Tizen.NUI.Color.Black);
/// <summary> Bindable property of BorderlineOffset. Please do not open it. </summary>