Class
RichTextImageSource

Reperesents an image source in the RadRichTextEditor.

Definition

Namespace:Telerik.Maui.Controls.RichTextEditor

Assembly:Telerik.Maui.Controls.dll

Syntax:

cs-api-definition
public abstract class RichTextImageSource

Inheritance: objectRichTextImageSource

Derived Classes: RichTextDataImageSourceRichTextFileImageSourceRichTextStreamImageSourceRichTextUrlImageSource

Constructors

RichTextImageSource()

Declaration

cs-api-definition
protected RichTextImageSource()

Methods

FromData(byte[], RichTextImageType)

Creates a new instance of RichTextImageSource with the specified data buffer.

Declaration

cs-api-definition
public static RichTextImageSource FromData(byte[] data, RichTextImageType type)

Parameters

data

byte[]

Specifies the data buffer of the image.

type

RichTextImageType

Specifies the format type of the image.

Returns

RichTextImageSource

An instance of RichTextImageSource with the specified data buffer.

FromFile(string)

Creates a new instance of RichTextImageSource with the specified file path.

Declaration

cs-api-definition
public static RichTextImageSource FromFile(string path)

Parameters

path

string

Specifies the file path to the image.

Returns

RichTextImageSource

An instance of RichTextImageSource with the specified file path.

FromFile(string, RichTextImageType)

Creates a new instance of RichTextImageSource with the specified file path.

Declaration

cs-api-definition
public static RichTextImageSource FromFile(string path, RichTextImageType type)

Parameters

path

string

Specifies the file path to the image.

type

RichTextImageType

Specifies the format type of the image.

Returns

RichTextImageSource

An instance of RichTextImageSource with the specified file path.

FromStream(Func<CancellationToken, Task<Stream>>, RichTextImageType)

Creates a new instance of RichTextImageSource with the specified Stream.

Declaration

cs-api-definition
public static RichTextImageSource FromStream(Func<CancellationToken, Task<Stream>> stream, RichTextImageType type)

Parameters

stream

Func<CancellationToken, Task<Stream>>

Specifies a delegate returning a Stream for the image.

type

RichTextImageType

Specifies the format type of the image.

Returns

RichTextImageSource

FromStream(Func<Stream>, RichTextImageType)

Creates a new instance of RichTextImageSource with the specified Stream.

Declaration

cs-api-definition
public static RichTextImageSource FromStream(Func<Stream> stream, RichTextImageType type)

Parameters

stream

Func<Stream>

Specifies a delegate returning a Stream for the image.

type

RichTextImageType

Specifies the format type of the image.

Returns

RichTextImageSource

FromStream(Func<Task<Stream>>, RichTextImageType)

Creates a new instance of RichTextImageSource with the specified Stream.

Declaration

cs-api-definition
public static RichTextImageSource FromStream(Func<Task<Stream>> stream, RichTextImageType type)

Parameters

stream

Func<Task<Stream>>

Specifies a delegate returning a Stream for the image.

type

RichTextImageType

Specifies the format type of the image.

Returns

RichTextImageSource

FromStream(Stream, RichTextImageType)

Creates a new instance of RichTextImageSource with the specified Stream.

Declaration

cs-api-definition
public static RichTextImageSource FromStream(Stream stream, RichTextImageType type)

Parameters

stream

Stream

Specifies a Stream for the image.

type

RichTextImageType

Specifies the format type of the image.

Returns

RichTextImageSource

FromUrl(string)

Creates a new instance of RichTextImageSource with the specified URL.

Declaration

cs-api-definition
public static RichTextImageSource FromUrl(string url)

Parameters

url

string

Specifies the source URL of the image.

Returns

RichTextImageSource

An instance of RichTextImageSource with the specified URL.

ToImageSource()

Converts the current RichTextImageSource to an ImageSource.

Declaration

cs-api-definition
public abstract ImageSource ToImageSource()

Returns

ImageSource

The converted ImageSource.

Operators

implicit operator ImageSource(RichTextImageSource)

Converts the specified RichTextImageSource to an ImageSource.

Declaration

cs-api-definition
public static implicit operator ImageSource(RichTextImageSource imageSource)

Parameters

imageSource

RichTextImageSource

The RichTextImageSource to convert to.

Returns

ImageSource