HeightResizePolicy = ResizePolicyType.UseNaturalSize,
HorizontalAlignment = HorizontalAlignment.Center,
VerticalAlignment = VerticalAlignment.Center,
- TextColor = Color.White
+ TextColor = Tizen.NUI.Color.White,
};
}
}
var viewStyle = (ViewStyle)bindable;
return viewStyle.backgroundColorSelector;
});
+
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty ColorSelectorProperty = BindableProperty.Create("ColorSelector", typeof(Selector<Color>), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var viewStyle = (ViewStyle)bindable;
+ if (null == viewStyle.colorSelector) viewStyle.colorSelector = new Selector<Color>();
+ viewStyle.colorSelector.Clone(null == newValue ? new Selector<Color>() : (Selector<Color>)newValue);
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var viewStyle = (ViewStyle)bindable;
+ return viewStyle.colorSelector;
+ });
+
/// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
public static readonly BindableProperty BackgroundImageBorderSelectorProperty = BindableProperty.Create("BackgroundImageBorderSelector", typeof(Selector<Rectangle>), typeof(ViewStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
private Selector<float?> opacitySelector;
private Selector<Color> backgroundColorSelector;
private Selector<Rectangle> backgroundImageBorderSelector;
+ private Selector<Color> colorSelector;
static ViewStyle() {}
set => SetValue(BackgroundColorSelectorProperty, value);
}
+ /// <summary>
+ /// Color
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Selector<Color> Color
+ {
+ get
+ {
+ Selector<Color> color = (Selector<Color>)GetValue(ColorSelectorProperty);
+ return (null != color) ? color : colorSelector = new Selector<Color>();
+ }
+ set => SetValue(ColorSelectorProperty, value);
+ }
+
/// <summary>View BackgroundBorder</summary>
/// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
{
get
{
- Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
- GetProperty(Interop.ActorProperty.Actor_Property_COLOR_get()).Get(temp);
+ Color temp = (Color)GetValue(ColorProperty);
return new Color(OnColorChanged, temp.R, temp.G, temp.B, temp.A);
}
set
{
- SetColor(value);
+ SetValue(ColorProperty, value);
+ NotifyPropertyChanged();
}
}
return _backgroundColorSelector;
}
}
+
+ internal static readonly BindableProperty ColorSelectorProperty = BindableProperty.Create("ColorSelector", typeof(Selector<Color>), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var view = (View)bindable;
+ view.colorSelector.Clone((Selector<Color>)newValue);
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var view = (View)bindable;
+ return view.colorSelector;
+ });
+
+ private TriggerableSelector<Color> _colorSelector;
+ private TriggerableSelector<Color> colorSelector
+ {
+ get
+ {
+ if (null == _colorSelector)
+ {
+ _colorSelector = new TriggerableSelector<Color>(this, ColorProperty);
+ }
+ return _colorSelector;
+ }
+ }
+
internal static readonly BindableProperty BackgroundImageBorderSelectorProperty = BindableProperty.Create("BackgroundImageBorderSelector", typeof(Selector<Rectangle>), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
{
var view = (View)bindable;
return backgroundColor;
});
+ /// <summary>
+ /// ColorProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty ColorProperty = BindableProperty.Create("Color", typeof(Color), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var view = (View)bindable;
+ if (newValue != null)
+ {
+ view.SetColor((Color)newValue);
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var view = (View)bindable;
+ Color color = new Color(0.0f, 0.0f, 0.0f, 0.0f);
+ view.GetProperty(Interop.ActorProperty.Actor_Property_COLOR_get()).Get(color);
+ return color;
+ });
+
/// <summary> BackgroundImageProperty </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public static readonly BindableProperty BackgroundImageProperty = BindableProperty.Create("BackgroundImage", typeof(string), typeof(View), default(string), propertyChanged: (bindable, oldValue, newValue) =>