Class SkiaEditor
public class SkiaEditor : SkiaLayout, INotifyPropertyChanged, IEffectControlProvider, IToolTipElement, IContextFlyoutElement, IAnimatable, IVisualElementController, IElementController, IView, ITransform, IElement, IVisualTreeElement, IContainer, IList<IView>, ICollection<IView>, IEnumerable<IView>, IEnumerable, IHasAfterEffects, ISkiaDisposable, ISkiaGridLayout, ISkiaLayout, ISkiaControl, IDrawnBase, ICanBeUpdatedWithContext, ICanBeUpdated, ILayoutInsideViewport, IInsideViewport, IVisibilityAware, IDisposable, ISkiaGestureListener
- Inheritance
-
SkiaEditor
- Implements
- Inherited Members
- Extension Methods
Constructors
SkiaEditor()
public SkiaEditor()
Fields
ActionDone
public static string ActionDone
Field Value
ActionGo
public static string ActionGo
Field Value
ActionNext
public static string ActionNext
Field Value
ActionSearch
public static string ActionSearch
Field Value
ActionSend
public static string ActionSend
Field Value
CanShowCursorProperty
public static readonly BindableProperty CanShowCursorProperty
Field Value
CommandOnFocusChangedProperty
public static readonly BindableProperty CommandOnFocusChangedProperty
Field Value
CommandOnSubmitProperty
public static readonly BindableProperty CommandOnSubmitProperty
Field Value
CommandOnTextChangedProperty
public static readonly BindableProperty CommandOnTextChangedProperty
Field Value
CursorColorProperty
public static readonly BindableProperty CursorColorProperty
Field Value
CursorGradientProperty
public static readonly BindableProperty CursorGradientProperty
Field Value
CursorPositionProperty
public static readonly BindableProperty CursorPositionProperty
Field Value
FontFamilyProperty
public static readonly BindableProperty FontFamilyProperty
Field Value
FontSizeProperty
public static readonly BindableProperty FontSizeProperty
Field Value
FontWeightProperty
public static readonly BindableProperty FontWeightProperty
Field Value
HorizontalTextAlignmentProperty
public static readonly BindableProperty HorizontalTextAlignmentProperty
Field Value
IsFocusedProperty
public static readonly BindableProperty IsFocusedProperty
Field Value
LineHeightProperty
public static readonly BindableProperty LineHeightProperty
Field Value
MaxLinesProperty
public static readonly BindableProperty MaxLinesProperty
Field Value
ReturnTypeProperty
public static readonly BindableProperty ReturnTypeProperty
Field Value
TextColorProperty
public static readonly BindableProperty TextColorProperty
Field Value
TextGradientProperty
public static readonly BindableProperty TextGradientProperty
Field Value
TextProperty
public static readonly BindableProperty TextProperty
Field Value
TimerUpdateParentCursorPosition
protected RestartingTimer<int> TimerUpdateParentCursorPosition
Field Value
VerticalTextAlignmentProperty
public static readonly BindableProperty VerticalTextAlignmentProperty
Field Value
Properties
CanShowCursor
public bool CanShowCursor { get; set; }
Property Value
CommandOnFocusChanged
public ICommand CommandOnFocusChanged { get; set; }
Property Value
CommandOnSubmit
public ICommand CommandOnSubmit { get; set; }
Property Value
CommandOnTextChanged
public ICommand CommandOnTextChanged { get; set; }
Property Value
Cursor
public SkiaCursor Cursor { get; protected set; }
Property Value
CursorColor
public Color CursorColor { get; set; }
Property Value
CursorGradient
public SkiaGradient CursorGradient { get; set; }
Property Value
CursorPosition
public int CursorPosition { 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
HorizontalTextAlignment
public DrawTextAlignment HorizontalTextAlignment { get; set; }
Property Value
IsFocused
public bool IsFocused { get; set; }
Property Value
IsMultiline
public bool IsMultiline { get; }
Property Value
Label
public SkiaLabel Label { get; protected set; }
Property Value
LineHeight
public double LineHeight { get; set; }
Property Value
MaxLines
public int MaxLines { get; set; }
Property Value
ReturnType
public ReturnType ReturnType { get; set; }
Property Value
Text
public string Text { get; set; }
Property Value
TextColor
public Color TextColor { get; set; }
Property Value
TextGradient
public SkiaGradient TextGradient { get; set; }
Property Value
VerticalTextAlignment
public TextAlignment VerticalTextAlignment { get; set; }
Property Value
WillClipBounds
Used to check whether to apply IsClippedToBounds property
public override bool WillClipBounds { get; }
Property Value
Methods
CreateControl()
public virtual void CreateControl()
CreateLabel()
public SkiaLabel CreateLabel()
Returns
DisposePlatform()
public void DisposePlatform()
GetCursorPosition(float, float)
Input in pixels
protected int GetCursorPosition(float x, float y)
Parameters
Returns
MoveCursorTo(double, double)
Translate cursor from the left top corner, params in pts.
protected virtual void MoveCursorTo(double x, double y)
Parameters
MoveInternalCursor()
Sets native contol cursor position to CursorPosition and calls UpdateCursorVisibility
protected void MoveInternalCursor()
OnControlCreated()
protected virtual void OnControlCreated()
OnCreatingLabel(SkiaLabel)
protected virtual SkiaLabel OnCreatingLabel(SkiaLabel label)
Parameters
labelSkiaLabel
Returns
OnDisposing()
Base performs some cleanup actions with Superview
public override void OnDisposing()
OnFocusChanged(bool)
This will be called only for views registered at Superview.FocusedChild. The view must return true of false to indicate if it accepts focus.
public override bool OnFocusChanged(bool focus)
Parameters
focusbool
Returns
OnLayoutChanged()
DrawingRect size changed
protected override void OnLayoutChanged()
OnMeasuring(float, float, float)
If you call this while measurement is in process (IsMeasuring==True) will return last measured value.
public override ScaledSize OnMeasuring(float widthConstraint, float heightConstraint, float scale)
Parameters
Returns
OnWillDisposeWithChildren()
The OnDisposing might come with a delay to avoid disposing resources at use. This method will be called without delay when Dispose() is invoked. Disposed will set to True and for Views their OnWillDisposeWithChildren will be called.
public override void OnWillDisposeWithChildren()
ProcessGestures(SkiaGesturesParameters, GestureEventProcessingInfo)
public override ISkiaGestureListener ProcessGestures(SkiaGesturesParameters args, GestureEventProcessingInfo apply)
Parameters
argsSkiaGesturesParametersapplyGestureEventProcessingInfo
Returns
SetCursorPositionNative(int, int)
public void SetCursorPositionNative(int position, int stop = -1)
Parameters
SetCursorPositionWithDelay(int, int)
We have to sync with a delay after text was changed otherwise the cursor position is not updated yet. Using restarting timer, every time this is called the timer is reset if callback wasn't executed yet.
protected void SetCursorPositionWithDelay(int ms, int position)
Parameters
SetFocus(bool)
public void SetFocus(bool focus)
Parameters
focusbool
SetFocusInternal(bool)
protected void SetFocusInternal(bool value)
Parameters
valuebool
SetFocusNative(bool)
public void SetFocusNative(bool focus)
Parameters
focusbool
SetSelection(int, int)
public virtual void SetSelection(int start, int end)
Parameters
Submit()
This is Done or Enter key, so maybe just split lines in specific case
public void Submit()
UpdateCursorVisibility()
Positions cursor control where it should be using translation, and sets its visibility.
public virtual void UpdateCursorVisibility()
UpdateLabel()
public virtual void UpdateLabel()
UpdateNativePosition()
public void UpdateNativePosition()
Events
FocusChanged
public event EventHandler<bool> FocusChanged
Event Type
TextChanged
public event EventHandler<string> TextChanged
Event Type
TextSubmitted
public event EventHandler<string> TextSubmitted