Table of Contents

Class SkiaEditor

Namespace
DrawnUi.Draw
Assembly
DrawnUi.Maui.dll
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

string

ActionGo

public static string ActionGo

Field Value

string

ActionNext

public static string ActionNext

Field Value

string

ActionSearch

public static string ActionSearch

Field Value

string

ActionSend

public static string ActionSend

Field Value

string

CanShowCursorProperty

public static readonly BindableProperty CanShowCursorProperty

Field Value

BindableProperty

CommandOnFocusChangedProperty

public static readonly BindableProperty CommandOnFocusChangedProperty

Field Value

BindableProperty

CommandOnSubmitProperty

public static readonly BindableProperty CommandOnSubmitProperty

Field Value

BindableProperty

CommandOnTextChangedProperty

public static readonly BindableProperty CommandOnTextChangedProperty

Field Value

BindableProperty

CursorColorProperty

public static readonly BindableProperty CursorColorProperty

Field Value

BindableProperty

CursorGradientProperty

public static readonly BindableProperty CursorGradientProperty

Field Value

BindableProperty

CursorPositionProperty

public static readonly BindableProperty CursorPositionProperty

Field Value

BindableProperty

FontFamilyProperty

public static readonly BindableProperty FontFamilyProperty

Field Value

BindableProperty

FontSizeProperty

public static readonly BindableProperty FontSizeProperty

Field Value

BindableProperty

FontWeightProperty

public static readonly BindableProperty FontWeightProperty

Field Value

BindableProperty

HorizontalTextAlignmentProperty

public static readonly BindableProperty HorizontalTextAlignmentProperty

Field Value

BindableProperty

IsFocusedProperty

public static readonly BindableProperty IsFocusedProperty

Field Value

BindableProperty

LineHeightProperty

public static readonly BindableProperty LineHeightProperty

Field Value

BindableProperty

MaxLinesProperty

public static readonly BindableProperty MaxLinesProperty

Field Value

BindableProperty

ReturnTypeProperty

public static readonly BindableProperty ReturnTypeProperty

Field Value

BindableProperty

TextColorProperty

public static readonly BindableProperty TextColorProperty

Field Value

BindableProperty

TextGradientProperty

public static readonly BindableProperty TextGradientProperty

Field Value

BindableProperty

TextProperty

public static readonly BindableProperty TextProperty

Field Value

BindableProperty

TimerUpdateParentCursorPosition

protected RestartingTimer<int> TimerUpdateParentCursorPosition

Field Value

RestartingTimer<int>

VerticalTextAlignmentProperty

public static readonly BindableProperty VerticalTextAlignmentProperty

Field Value

BindableProperty

Properties

CanShowCursor

public bool CanShowCursor { get; set; }

Property Value

bool

CommandOnFocusChanged

public ICommand CommandOnFocusChanged { get; set; }

Property Value

ICommand

CommandOnSubmit

public ICommand CommandOnSubmit { get; set; }

Property Value

ICommand

CommandOnTextChanged

public ICommand CommandOnTextChanged { get; set; }

Property Value

ICommand

Cursor

public SkiaCursor Cursor { get; protected set; }

Property Value

SkiaCursor

CursorColor

public Color CursorColor { get; set; }

Property Value

Color

CursorGradient

public SkiaGradient CursorGradient { get; set; }

Property Value

SkiaGradient

CursorPosition

public int CursorPosition { get; set; }

Property Value

int

FontFamily

public string FontFamily { get; set; }

Property Value

string

FontSize

public double FontSize { get; set; }

Property Value

double

FontWeight

public int FontWeight { get; set; }

Property Value

int

HorizontalTextAlignment

public DrawTextAlignment HorizontalTextAlignment { get; set; }

Property Value

DrawTextAlignment

IsFocused

public bool IsFocused { get; set; }

Property Value

bool

IsMultiline

public bool IsMultiline { get; }

Property Value

bool

Label

public SkiaLabel Label { get; protected set; }

Property Value

SkiaLabel

LineHeight

public double LineHeight { get; set; }

Property Value

double

MaxLines

public int MaxLines { get; set; }

Property Value

int

ReturnType

public ReturnType ReturnType { get; set; }

Property Value

ReturnType

Text

public string Text { get; set; }

Property Value

string

TextColor

public Color TextColor { get; set; }

Property Value

Color

TextGradient

public SkiaGradient TextGradient { get; set; }

Property Value

SkiaGradient

VerticalTextAlignment

public TextAlignment VerticalTextAlignment { get; set; }

Property Value

TextAlignment

WillClipBounds

Used to check whether to apply IsClippedToBounds property

public override bool WillClipBounds { get; }

Property Value

bool

Methods

CreateControl()

public virtual void CreateControl()

CreateLabel()

public SkiaLabel CreateLabel()

Returns

SkiaLabel

DisposePlatform()

public void DisposePlatform()

GetCursorPosition(float, float)

Input in pixels

protected int GetCursorPosition(float x, float y)

Parameters

x float
y float

Returns

int

MoveCursorTo(double, double)

Translate cursor from the left top corner, params in pts.

protected virtual void MoveCursorTo(double x, double y)

Parameters

x double
y double

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

label SkiaLabel

Returns

SkiaLabel

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

focus bool

Returns

bool

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

widthConstraint float
heightConstraint float
scale float

Returns

ScaledSize

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

args SkiaGesturesParameters
apply GestureEventProcessingInfo

Returns

ISkiaGestureListener

SetCursorPositionNative(int, int)

public void SetCursorPositionNative(int position, int stop = -1)

Parameters

position int
stop int

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

ms int
position int

SetFocus(bool)

public void SetFocus(bool focus)

Parameters

focus bool

SetFocusInternal(bool)

protected void SetFocusInternal(bool value)

Parameters

value bool

SetFocusNative(bool)

public void SetFocusNative(bool focus)

Parameters

focus bool

SetSelection(int, int)

public virtual void SetSelection(int start, int end)

Parameters

start int
end int

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

EventHandler<bool>

TextChanged

public event EventHandler<string> TextChanged

Event Type

EventHandler<string>

TextSubmitted

public event EventHandler<string> TextSubmitted

Event Type

EventHandler<string>