Class TextSpan
public class TextSpan : Element, INotifyPropertyChanged, IElementController, IVisualTreeElement, IEffectControlProvider, IToolTipElement, IContextFlyoutElement, IElement, IDisposable
- Inheritance
-
TextSpan
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
TextSpan()
public TextSpan()
Fields
FontSizeProperty
public static readonly BindableProperty FontSizeProperty
Field Value
Rects
Relative to DrawingRect
public readonly List<SKRect> Rects
Field Value
TextColorProperty
public static readonly BindableProperty TextColorProperty
Field Value
TextProperty
public static readonly BindableProperty TextProperty
Field Value
_fontAutoSet
protected bool _fontAutoSet
Field Value
Properties
AutoFindFont
If any glyph cannot be rendered with selected font try find system font that supports it and switch to it for the whole span
public bool AutoFindFont { get; set; }
Property Value
BackgroundColor
public Color BackgroundColor { get; set; }
Property Value
CommandTapped
public ICommand CommandTapped { get; set; }
Property Value
DebugString
public string DebugString { get; }
Property Value
Default
public static TextSpan Default { get; }
Property Value
DrawingOffset
Rendering offset, set when combining spans. Ofset of the first line.
public SKPoint DrawingOffset { get; set; }
Property Value
FontDetectedWith
public int FontDetectedWith { get; set; }
Property Value
FontFamily
public string FontFamily { get; set; }
Property Value
FontSize
public double FontSize { get; set; }
Property Value
FontWeight
public int FontWeight { get; set; }
Property Value
ForceCaptureInput
When no tap handler or command are set this forces to listen to taps anyway
public bool ForceCaptureInput { get; set; }
Property Value
Glyphs
Ig can be drawn char by char with char spacing etc we use this
public List<UsedGlyph> Glyphs { get; protected set; }
Property Value
HasDecorations
public bool HasDecorations { get; }
Property Value
HasSetColor
public bool HasSetColor { get; set; }
Property Value
HasSetFont
public bool HasSetFont { get; set; }
Property Value
HasSetSize
public bool HasSetSize { get; set; }
Property Value
HasTapHandler
Will listen to gestures
public bool HasTapHandler { get; }
Property Value
IsBold
public bool IsBold { get; set; }
Property Value
IsItalic
public bool IsItalic { get; set; }
Property Value
LineHeight
public float LineHeight { get; set; }
Property Value
LineSpacing
public float LineSpacing { get; set; }
Property Value
NeedShape
public bool NeedShape { get; set; }
Property Value
Paint
public SKPaint Paint { get; set; }
Property Value
ParagraphColor
public Color ParagraphColor { get; set; }
Property Value
ParentControl
protected SkiaControl ParentControl { get; }
Property Value
RenderingScale
public float RenderingScale { get; set; }
Property Value
Shape
If text can be drawn only shaped we use this
public string Shape { get; protected set; }
Property Value
Strikeout
public bool Strikeout { get; set; }
Property Value
StrikeoutColor
public Color StrikeoutColor { get; set; }
Property Value
StrikeoutWidth
In points
public double StrikeoutWidth { get; set; }
Property Value
Tag
public string Tag { get; set; }
Property Value
Text
public string Text { get; set; }
Property Value
TextColor
public Color TextColor { get; set; }
Property Value
TextFiltered
public string TextFiltered { get; protected set; }
Property Value
TypeFace
public SKTypeface TypeFace { get; set; }
Property Value
Underline
public bool Underline { get; set; }
Property Value
UnderlineWidth
In points, if set to negative will be in pixels instead.
public double UnderlineWidth { get; set; }
Property Value
Methods
CheckGlyphsCanBeRendered()
Parse glyphs, setup typeface, replace unrenderable glyphs with fallback character
public void CheckGlyphsCanBeRendered()
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public virtual void Dispose()
FireTap()
public virtual void FireTap()
HitIsInside(float, float)
public virtual bool HitIsInside(float x, float y)
Parameters
Returns
OnPropertyChanged(string)
Method that is called when a bound property is changed.
protected override void OnPropertyChanged(string propertyName = null)
Parameters
propertyNamestringThe name of the bound property that changed.
SetupPaint(double, SKPaint)
Update the paint with current format properties
public SKPaint SetupPaint(double scale, SKPaint defaultPaint)
Parameters
Returns
UpdateFont()
protected virtual void UpdateFont()
Events
Tapped
public event EventHandler<ControlTappedEventArgs> Tapped