var textFieldStyle = (TextFieldStyle)bindable;
return textFieldStyle.translatablePlaceholderTextSelector;
});
+ /// This will be public opened in tizen_6.5 after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty TranslatablePlaceholderTextFocusedSelectorProperty = BindableProperty.Create("TranslatablePlaceholderTextFocusedSelector", typeof(Selector<string>), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var textFieldStyle = (TextFieldStyle)bindable;
+ textFieldStyle.translatablePlaceholderTextFocusedSelector = ((Selector<string>)newValue)?.Clone();
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var textFieldStyle = (TextFieldStyle)bindable;
+ return textFieldStyle.translatablePlaceholderTextFocusedSelector;
+ });
/// 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 TextSelectorProperty = BindableProperty.Create("TextSelector", typeof(Selector<string>), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
private bool? matchSystemLanguageDirection;
private Selector<string> translatableTextSelector;
private Selector<string> translatablePlaceholderTextSelector;
+ private Selector<string> translatablePlaceholderTextFocusedSelector;
private Selector<string> textSelector;
private Selector<string> fontFamilySelector;
private Selector<Color> textColorSelector;
set => SetValue(TranslatablePlaceholderTextSelectorProperty, value);
}
+ /// This will be public opened in tizen_6.5 after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Selector<string> TranslatablePlaceholderTextFocused
+ {
+ get
+ {
+ Selector<string> tmp = (Selector<string>)GetValue(TranslatablePlaceholderTextFocusedSelectorProperty);
+ return (null != tmp) ? tmp : translatablePlaceholderTextFocusedSelector = new Selector<string>();
+ }
+ set => SetValue(TranslatablePlaceholderTextFocusedSelectorProperty, value);
+ }
+
/// 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 Selector<string> Text
{
private string textFieldTextSid = null;
private string textFieldPlaceHolderTextSid = null;
+ private string textFieldPlaceHolderTextFocusedSid = null;
private bool systemlangTextFlag = false;
private InputMethodContext inputMethodCotext = null;
private TextFieldSelectorData selectorData;
}
/// <summary>
+ /// The TranslatablePlaceholderTextFocused property.<br />
+ /// The text can set the SID value.<br />
+ /// </summary>
+ /// <exception cref='ArgumentNullException'>
+ /// ResourceManager about multilingual is null.
+ /// </exception>
+ /// This will be public opened in tizen_6.5 after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public string TranslatablePlaceholderTextFocused
+ {
+ get
+ {
+ return (string)GetValue(TranslatablePlaceholderTextFocusedProperty);
+ }
+ set
+ {
+ SetValue(TranslatablePlaceholderTextFocusedProperty, value);
+ selectorData?.TranslatablePlaceholderTextFocused.UpdateIfNeeds(this, value);
+ }
+ }
+ private string translatablePlaceholderTextFocused
+ {
+ get
+ {
+ return textFieldPlaceHolderTextFocusedSid;
+ }
+ set
+ {
+ if (NUIApplication.MultilingualResourceManager == null)
+ {
+ throw new ArgumentNullException(null, "ResourceManager about multilingual is null");
+ }
+ textFieldPlaceHolderTextFocusedSid = value;
+ PlaceholderTextFocused = SetTranslatable(textFieldPlaceHolderTextFocusedSid);
+ NotifyPropertyChanged();
+ }
+ }
+
+ /// <summary>
/// The Text property.
/// </summary>
/// <since_tizen> 3 </since_tizen>
{
PlaceholderText = NUIApplication.MultilingualResourceManager?.GetString(textFieldPlaceHolderTextSid, new CultureInfo(e.Value.Replace("_", "-")));
}
+ if (textFieldPlaceHolderTextFocusedSid != null)
+ {
+ PlaceholderTextFocused = NUIApplication.MultilingualResourceManager?.GetString(textFieldPlaceHolderTextFocusedSid, new CultureInfo(e.Value.Replace("_", "-")));
+ }
}
internal new class Property
var textField = (TextField)bindable;
return textField.translatablePlaceholderText;
});
+ /// <summary>
+ /// TranslatablePlaceholderTextFocused property
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty TranslatablePlaceholderTextFocusedProperty = BindableProperty.Create(nameof(TranslatablePlaceholderTextFocused), typeof(string), typeof(TextField), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var textField = (TextField)bindable;
+ if (newValue != null)
+ {
+ textField.translatablePlaceholderTextFocused = (string)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var textField = (TextField)bindable;
+ return textField.translatablePlaceholderTextFocused;
+ });
/// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
public static readonly BindableProperty TextProperty = BindableProperty.Create(nameof(Text), typeof(string), typeof(TextField), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
var textField = (TextField)bindable;
return textField.SelectorData.TranslatablePlaceholderText.Get(textField);
});
+ internal static readonly BindableProperty TranslatablePlaceholderTextFocusedSelectorProperty = BindableProperty.Create("TranslatablePlaceholderTextFocusedSelector", typeof(Selector<string>), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var textField = (TextField)bindable;
+ textField.SelectorData.TranslatablePlaceholderTextFocused.Update(textField, (Selector<string>)newValue, true);
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var textField = (TextField)bindable;
+ return textField.SelectorData.TranslatablePlaceholderTextFocused.Get(textField);
+ });
internal static readonly BindableProperty TextSelectorProperty = BindableProperty.Create("TextSelector", typeof(Selector<string>), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) =>
{
var textField = (TextField)bindable;
public TriggerableSelector<Color> TextColor { get; } = new TriggerableSelector<Color>(TextField.TextColorProperty, GetTextColor);
public TriggerableSelector<float?> PointSize { get; } = new TriggerableSelector<float?>(TextField.PointSizeProperty);
public TriggerableSelector<string> TranslatablePlaceholderText { get; } = new TriggerableSelector<string>(TextField.TranslatablePlaceholderTextProperty);
+ public TriggerableSelector<string> TranslatablePlaceholderTextFocused { get; } = new TriggerableSelector<string>(TextField.TranslatablePlaceholderTextFocusedProperty);
public TriggerableSelector<Vector4> PlaceholderTextColor { get; } = new TriggerableSelector<Vector4>(TextField.PlaceholderTextColorProperty, delegate (View view)
{
Vector4 color = new Vector4();
TextColor.Reset(view);
PointSize.Reset(view);
TranslatablePlaceholderText.Reset(view);
+ TranslatablePlaceholderTextFocused.Reset(view);
PlaceholderTextColor.Reset(view);
PrimaryCursorColor.Reset(view);
}