{
if (buttonIcon != null)
{
- buttonIcon.Relayout -= OnIconRelayout;
Utility.Dispose(buttonIcon);
}
if (buttonText != null)
base.OnFocusGained();
UpdateState();
}
+
/// <summary>
/// Called when the control loses key input focus. Should be overridden by derived classes if they need to customize what happens when the focus is lost.
/// </summary>
if (null == buttonIcon)
{
buttonIcon = new ImageControl();
- buttonIcon.Relayout += OnIconRelayout;
this.Add(buttonIcon);
}
return new ButtonStyle();
}
+ /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ protected override void OnUpdate()
+ {
+ base.OnUpdate();
+ UpdateUIContent();
+ }
+
/// <summary>
/// Update Button State.
/// </summary>
private TapGestureDetector tapGestureDetector = new TapGestureDetector();
private bool isFocused = false;
- internal ImageView backgroundImage;
+ internal ImageView backgroundImage = new ImageView();
internal ImageView shadowImage;
/// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
}
shadowImage.ApplyStyle(controlStyle.Shadow);
-
- if (null == backgroundImage)
- {
- backgroundImage = new ImageView()
- {
- WidthResizePolicy = ResizePolicyType.FillToParent,
- HeightResizePolicy = ResizePolicyType.FillToParent,
- };
- this.Add(backgroundImage);
- }
+ }
+ if (null != controlStyle.BackgroundImage)
+ {
+ backgroundImage.WidthResizePolicy = ResizePolicyType.FillToParent;
+ backgroundImage.HeightResizePolicy = ResizePolicyType.FillToParent;
+ this.Add(backgroundImage);
}
}
private void Initialize(string style)
{
ControlState = ControlStates.Normal;
- if(null == backgroundImage)
- {
- backgroundImage = new ImageView()
- {
- WidthResizePolicy = ResizePolicyType.FillToParent,
- HeightResizePolicy = ResizePolicyType.FillToParent,
- };
- this.Add(backgroundImage);
- }
RegisterDetectionOfSubstyleChanges();
{
SetUpListContainer();
}
- button.ApplyStyle(Style.Button);
- headerText.ApplyStyle(Style.HeaderText);
- listBackgroundImage.ApplyStyle(Style.ListBackgroundImage);
+ button.ApplyStyle(dropDownStyle.Button);
+ headerText.ApplyStyle(dropDownStyle.HeaderText);
+ listBackgroundImage.ApplyStyle(dropDownStyle.ListBackgroundImage);
UpdateDropDown();
}
}
if (listItemData.CheckImageResourceUrl != null)
{
listItemView.CheckResourceUrl = listItemData.CheckImageResourceUrl;
- listItemView.CheckImageSize = listItemData.CheckImageSize;
+
+ if (null != listItemData.CheckImageSize)
+ {
+ listItemView.CheckImageSize = listItemData.CheckImageSize;
+ }
+
if (listItemView.CheckImageSize != null)
{
listItemView.CheckPosition = new Position(listItemView.Size2D.Width - listItemData.CheckImageGapToBoundary - listItemView.CheckImageSize.Width, (listItemView.Size2D.Height - listItemView.CheckImageSize.Height) / 2);
return imageControl.BorderSelector;
});
- /// <summary>
- /// Control style.
- /// </summary>
- /// <since_tizen> 6 </since_tizen>
- /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- private ImageControlStyle imageControlStyle;
-
- /// 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 new ImageControlStyle Style => imageControlStyle;
-
internal ImageView imageView;
/// <summary>
Initialize(style);
}
+ /// 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 new ImageControlStyle Style => ViewStyle as ImageControlStyle;
+
/// <summary>
/// Override view's BackgroundImage.
/// </summary>
};
this.Add(imageView);
}
+ imageView.RaiseToTop();
}
}
[EditorBrowsable(EditorBrowsableState.Never)]
protected override ViewStyle GetViewStyle()
{
- imageControlStyle = new ImageControlStyle();
- return imageControlStyle;
+ return new ImageControlStyle(); ;
}
private void Initialize(string style)
}
}
+ /// 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 override void ApplyStyle(ViewStyle viewStyle)
+ {
+ base.ApplyStyle(viewStyle);
+
+ InputFieldStyle inputFieldStyle = viewStyle as InputFieldStyle;
+
+ if (null != inputFieldStyle.BackgroundImageAttributes)
+ {
+ if (null == bgImage)
+ {
+ bgImage = new ImageView()
+ {
+ WidthResizePolicy = ResizePolicyType.FillToParent,
+ HeightResizePolicy = ResizePolicyType.FillToParent,
+ };
+
+ this.Add(bgImage);
+ }
+ bgImage.ApplyStyle(inputFieldStyle.BackgroundImageAttributes);
+ }
+ if (null != inputFieldStyle.InputBoxAttributes)
+ {
+ if (null == textField)
+ {
+ textField = new TextField()
+ {
+ WidthResizePolicy = ResizePolicyType.Fixed,
+ HeightResizePolicy = ResizePolicyType.Fixed,
+ ParentOrigin = Tizen.NUI.ParentOrigin.CenterLeft,
+ PivotPoint = Tizen.NUI.PivotPoint.CenterLeft,
+ PositionUsesPivotPoint = true,
+ };
+ this.Add(textField);
+ textField.FocusGained += OnTextFieldFocusGained;
+ textField.FocusLost += OnTextFieldFocusLost;
+ textField.TextChanged += OnTextFieldTextChanged;
+ textField.KeyEvent += OnTextFieldKeyEvent;
+ }
+ textField.ApplyStyle(inputFieldStyle.InputBoxAttributes);
+ }
+ }
+
/// <summary>
/// Get Input Field attribues.
/// </summary>
throw new Exception("Fail to get the InputField attributes.");
}
- bgImage = new ImageView();
if (null == bgImage)
{
- throw new Exception("Fail to create background image.");
- }
-
- textField = new TextField();
- if (null == textField)
- {
- throw new Exception("Fail to create text field.");
- }
+ bgImage = new ImageView()
+ {
+ WidthResizePolicy = ResizePolicyType.FillToParent,
+ HeightResizePolicy = ResizePolicyType.FillToParent,
+ };
- if (null != inputFieldAttrs.BackgroundImageAttributes)
- {
- bgImage.WidthResizePolicy = ResizePolicyType.FillToParent;
- bgImage.HeightResizePolicy = ResizePolicyType.FillToParent;
- bgImage.ParentOrigin = Tizen.NUI.ParentOrigin.Center;
- bgImage.PivotPoint = Tizen.NUI.PivotPoint.Center;
- bgImage.PositionUsesPivotPoint = true;
this.Add(bgImage);
}
-
- if (null != inputFieldAttrs.InputBoxAttributes)
+ if (null == textField)
{
- textField.WidthResizePolicy = ResizePolicyType.Fixed;
- textField.HeightResizePolicy = ResizePolicyType.Fixed;
- textField.ParentOrigin = Tizen.NUI.ParentOrigin.CenterLeft;
- textField.PivotPoint = Tizen.NUI.PivotPoint.CenterLeft;
- textField.PositionUsesPivotPoint = true;
+ textField = new TextField()
+ {
+ WidthResizePolicy = ResizePolicyType.Fixed,
+ HeightResizePolicy = ResizePolicyType.Fixed,
+ ParentOrigin = Tizen.NUI.ParentOrigin.CenterLeft,
+ PivotPoint = Tizen.NUI.PivotPoint.CenterLeft,
+ PositionUsesPivotPoint = true,
+ };
this.Add(textField);
-
textField.FocusGained += OnTextFieldFocusGained;
textField.FocusLost += OnTextFieldFocusLost;
textField.TextChanged += OnTextFieldTextChanged;
{
for (int i = 0; i < totalNum; i++)
{
- preW = (itemList[i].NaturalSize2D != null ? itemList[i].NaturalSize2D.Width : 0);
+ preW = (itemList[i].TextItem.NaturalSize2D != null ? itemList[i].TextItem.NaturalSize2D.Width : 0);
itemList[i].Position2D.X = preX;
itemList[i].Size2D.Width = preW;
preX = itemList[i].Position2D.X + preW + itemSpace;
/// <since_tizen> 6 </since_tizen>
/// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- public ImageViewStyle BackgroundImageAttributes
- {
- get;
- set;
- }
+ public ImageViewStyle BackgroundImageAttributes { get; set; }
/// <summary>
/// Gets or sets input box attributes of input field.
/// <since_tizen> 6 </since_tizen>
/// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- public TextFieldStyle InputBoxAttributes
- {
- get;
- set;
- }
+ public TextFieldStyle InputBoxAttributes { get; set; }
/// <summary>
/// Gets or sets space.
/// <since_tizen> 6 </since_tizen>
/// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- public int? Space
- {
- get;
- set;
- }
+ public int? Space { get; set; }
/// <summary>
/// Attributes's clone function.
[EditorBrowsable(EditorBrowsableState.Never)]
public static readonly BindableProperty IndicatorTypeProperty = BindableProperty.Create("IndicatorType", typeof(IndicatorType?), typeof(SliderStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
{
- var instance = (Tizen.NUI.Components.SliderStyle)bindable;
+ var instance = (SliderStyle)bindable;
if (newValue != null)
{
instance.privateIndicatorType = (IndicatorType)newValue;
});
/// 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 FontFamilySelectorProperty = BindableProperty.Create("FontFamily", typeof(Selector<string>), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty FontFamilySelectorProperty = BindableProperty.Create("FontFamilySelector", typeof(Selector<string>), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
{
var textFieldStyle = (TextFieldStyle)bindable;
if (null == textFieldStyle.fontFamilySelector)
var textField = (TextField)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.PLACEHOLDER_TEXT_COLOR, new Tizen.NUI.PropertyValue((Vector4)newValue));
+ Color color = (Color)newValue;
+ Vector4 vector = new Vector4(color.R, color.G, color.B, color.A);
+ Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.PLACEHOLDER_TEXT_COLOR, new Tizen.NUI.PropertyValue(vector));
}
},
defaultValueCreator: (bindable) =>
var textField = (TextField)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.PRIMARY_CURSOR_COLOR, new Tizen.NUI.PropertyValue((Vector4)newValue));
+ Color color = (Color)newValue;
+ Vector4 vector = new Vector4(color.R, color.G, color.B, color.A);
+ Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.PRIMARY_CURSOR_COLOR, new Tizen.NUI.PropertyValue(vector));
}
},
defaultValueCreator: (bindable) =>