New to Telerik UI for .NET MAUIStart a free 30-day trial

Reperesents an image source in the RadRichTextEditor.

Definition

Namespace:Telerik.Maui.Controls.RichTextEditor

Assembly:Telerik.Maui.Controls.dll

Syntax:

C#
public abstract class RichTextImageSource

Inheritance: objectRichTextImageSource

Derived Classes: RichTextDataImageSourceRichTextFileImageSourceRichTextStreamImageSourceRichTextUrlImageSource

Constructors

C#
protected RichTextImageSource()

Methods

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

C#
public static RichTextImageSource FromData(byte[] data, RichTextImageType type)
Parameters:databyte[]

Specifies the data buffer of the image.

typeRichTextImageType

Specifies the format type of the image.

Returns:

RichTextImageSource

An instance of RichTextImageSource with the specified data buffer.

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

C#
public static RichTextImageSource FromFile(string path, RichTextImageType type)
Parameters:pathstring

Specifies the file path to the image.

typeRichTextImageType

Specifies the format type of the image.

Returns:

RichTextImageSource

An instance of RichTextImageSource with the specified file path.

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

C#
public static RichTextImageSource FromFile(string path)
Parameters:pathstring

Specifies the file path to the image.

Returns:

RichTextImageSource

An instance of RichTextImageSource with the specified file path.

Creates a new instance of RichTextImageSource with the specified Stream.

C#
public static RichTextImageSource FromStream(Func<CancellationToken, Task<Stream>> stream, RichTextImageType type)
Parameters:streamFunc<CancellationToken, Task<Stream>>

Specifies a delegate returning a Stream for the image.

typeRichTextImageType

Specifies the format type of the image.

Returns:

RichTextImageSource

Creates a new instance of RichTextImageSource with the specified Stream.

C#
public static RichTextImageSource FromStream(Func<Stream> stream, RichTextImageType type)
Parameters:streamFunc<Stream>

Specifies a delegate returning a Stream for the image.

typeRichTextImageType

Specifies the format type of the image.

Returns:

RichTextImageSource

Creates a new instance of RichTextImageSource with the specified Stream.

C#
public static RichTextImageSource FromStream(Func<Task<Stream>> stream, RichTextImageType type)
Parameters:streamFunc<Task<Stream>>

Specifies a delegate returning a Stream for the image.

typeRichTextImageType

Specifies the format type of the image.

Returns:

RichTextImageSource

Creates a new instance of RichTextImageSource with the specified Stream.

C#
public static RichTextImageSource FromStream(Stream stream, RichTextImageType type)
Parameters:streamStream

Specifies a Stream for the image.

typeRichTextImageType

Specifies the format type of the image.

Returns:

RichTextImageSource

Creates a new instance of RichTextImageSource with the specified URL.

C#
public static RichTextImageSource FromUrl(string url)
Parameters:urlstring

Specifies the source URL of the image.

Returns:

RichTextImageSource

An instance of RichTextImageSource with the specified URL.

ToImageSource()

ImageSource

Converts the current RichTextImageSource to an ImageSource.

C#
public abstract ImageSource ToImageSource()
Returns:

ImageSource

The converted ImageSource.

Operators

Converts the specified RichTextImageSource to an ImageSource.

C#
public static implicit operator ImageSource(RichTextImageSource imageSource)
Parameters:imageSourceRichTextImageSource

The RichTextImageSource to convert to.

Returns:

ImageSource