[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextLabel_Property_STRIKETHROUGH_get")]
public static extern int StrikethroughGet();
+
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextLabel_Property_CHARACTER_SPACING_get")]
public static extern int CharacterSpacingGet();
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextLabel_Property_ANCHOR_COLOR_get")]
+ public static extern int AnchorColorGet();
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextLabel_Property_ANCHOR_CLICKED_COLOR_get")]
+ public static extern int AnchorClickedColorGet();
}
}
}
var textLabelStyle = (TextLabelStyle)bindable;
return textLabelStyle.fontSizeScale;
});
+ public static readonly BindableProperty AnchorColorProperty = BindableProperty.Create(nameof(AnchorColor), typeof(Color), typeof(TextLabelStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var textLabelStyle = (TextLabelStyle)bindable;
+ textLabelStyle.anchorColor = (Color)newValue;
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var textLabelStyle = (TextLabelStyle)bindable;
+ return textLabelStyle.anchorColor;
+ });
+ public static readonly BindableProperty AnchorClickedColorProperty = BindableProperty.Create(nameof(AnchorClickedColor), typeof(Color), typeof(TextLabelStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var textLabelStyle = (TextLabelStyle)bindable;
+ textLabelStyle.anchorClickedColor = (Color)newValue;
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var textLabelStyle = (TextLabelStyle)bindable;
+ return textLabelStyle.anchorClickedColor;
+ });
/// 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 MatchSystemLanguageDirectionProperty = BindableProperty.Create(nameof(MatchSystemLanguageDirection), typeof(bool?), typeof(TextLabelStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
private PropertyMap fontStyle;
private float? characterSpacing;
private float? fontSizeScale;
+ private Color anchorColor;
+ private Color anchorClickedColor;
static TextLabelStyle() { }
set => SetValue(FontSizeScaleProperty, value);
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Color AnchorColor
+ {
+ get => (Color)GetValue(AnchorColorProperty);
+ set => SetValue(AnchorColorProperty, value);
+ }
+
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Color AnchorClickedColor
+ {
+ get => (Color)GetValue(AnchorClickedColorProperty);
+ set => SetValue(AnchorClickedColorProperty, 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 bool? MatchSystemLanguageDirection
private bool hasSystemFontTypeChanged = false;
private Color internalTextColor;
+ private Color internalAnchorColor;
+ private Color internalAnchorClickedColor;
/// <summary>
/// Creates the TextLabel control.
}
/// <summary>
+ /// The AnchorColor property.<br />
+ /// The color of the anchor.<br />
+ /// This property is used as the default color of the markup anchor tag.<br />
+ /// If there is a color attribute in the markup anchor tag, the markup attribute takes precedence.
+ /// </summary>
+ /// <remarks>
+ /// The property cascade chaining set is possible. For example, this (textLabel.AnchorColor.X = 0.1f;) is possible.
+ /// </remarks>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Color AnchorColor
+ {
+ get
+ {
+ Color color = (Color)GetValue(AnchorColorProperty);
+ return new Color(OnAnchorColorChanged, color.R, color.G, color.B, color.A);
+ }
+ set
+ {
+ SetValue(AnchorColorProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ /// <summary>
+ /// The AnchorClickedColor property.<br />
+ /// The color of the clicked anchor.<br />
+ /// This property is used as the default clicked color of the markup anchor tag.<br />
+ /// If there is a color attribute in the markup anchor tag, the markup attribute takes precedence.
+ /// </summary>
+ /// <remarks>
+ /// The property cascade chaining set is possible. For example, this (textLabel.AnchorClickedColor.X = 0.1f;) is possible.
+ /// </remarks>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Color AnchorClickedColor
+ {
+ get
+ {
+ Color color = (Color)GetValue(AnchorClickedColorProperty);
+ return new Color(OnAnchorClickedColorChanged, color.R, color.G, color.B, color.A);
+ }
+ set
+ {
+ SetValue(AnchorClickedColorProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ /// <summary>
/// The FontSizeScale property for scaling the specified font size up or down. <br />
/// The default value is 1.0. <br />
/// The given font size scale value is used for multiplying the specified font size before querying fonts. <br />
}
internalTextColor?.Dispose();
+ internalAnchorColor?.Dispose();
+ internalAnchorClickedColor?.Dispose();
if (hasSystemLanguageChanged)
{
internal static readonly int EllipsisPosition = Interop.TextLabel.EllipsisPositionGet();
internal static readonly int Strikethrough = Interop.TextLabel.StrikethroughGet();
internal static readonly int CharacterSpacing = Interop.TextLabel.CharacterSpacingGet();
+ internal static readonly int AnchorColor = Interop.TextLabel.AnchorColorGet();
+ internal static readonly int AnchorClickedColor = Interop.TextLabel.AnchorClickedColorGet();
+
internal static void Preload()
{
{
UnderlineColor = new Vector4(x, y, z, w);
}
+ private void OnAnchorColorChanged(float r, float g, float b, float a)
+ {
+ AnchorColor = new Color(r, g, b, a);
+ }
+ private void OnAnchorClickedColorChanged(float r, float g, float b, float a)
+ {
+ AnchorClickedColor = new Color(r, g, b, a);
+ }
}
}
return textLabel.internalTextColor;
}));
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty AnchorColorProperty = BindableProperty.Create(nameof(TextLabel.AnchorColor), typeof(Color), typeof(TextLabel), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
+ {
+ var textLabel = (TextLabel)bindable;
+ if (newValue != null)
+ {
+ Object.InternalSetPropertyVector4(textLabel.SwigCPtr, TextLabel.Property.AnchorColor, ((Color)newValue).SwigCPtr);
+ }
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+ {
+ var textLabel = (TextLabel)bindable;
+
+ if (textLabel.internalAnchorColor == null)
+ {
+ textLabel.internalAnchorColor = new Color(0, 0, 0, 0);
+ }
+ Object.InternalRetrievingPropertyVector4(textLabel.SwigCPtr, TextLabel.Property.TextColor, textLabel.internalAnchorColor.SwigCPtr);
+ return textLabel.internalAnchorColor;
+ }));
+
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty AnchorClickedColorProperty = BindableProperty.Create(nameof(TextLabel.AnchorClickedColor), typeof(Color), typeof(TextLabel), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
+ {
+ var textLabel = (TextLabel)bindable;
+ if (newValue != null)
+ {
+ Object.InternalSetPropertyVector4(textLabel.SwigCPtr, TextLabel.Property.AnchorClickedColor, ((Color)newValue).SwigCPtr);
+ }
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+ {
+ var textLabel = (TextLabel)bindable;
+
+ if (textLabel.internalAnchorClickedColor == null)
+ {
+ textLabel.internalAnchorClickedColor = new Color(0, 0, 0, 0);
+ }
+ Object.InternalRetrievingPropertyVector4(textLabel.SwigCPtr, TextLabel.Property.TextColor, textLabel.internalAnchorClickedColor.SwigCPtr);
+ return textLabel.internalAnchorClickedColor;
+ }));
+
/// 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 EnableMarkupProperty = BindableProperty.Create(nameof(EnableMarkup), typeof(bool), typeof(TextLabel), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
AutoScrollGap = 50.0f,
AutoScrollSpeed = 80,
FontSizeScale = Tizen.NUI.FontSizeScale.UseSystemSetting,
+ AnchorColor = Color.MediumBlue,
+ AnchorClickedColor = Color.DarkMagenta,
});
// TextField style.