Back to Devexpress

StreamHtmlSource Class

maui-devexpress-dot-maui-dot-htmleditor-90b958db.md

latest2.5 KB
Original Source

StreamHtmlSource Class

An HtmlEdit‘s data source that loads HTML text from Stream.

Namespace : DevExpress.Maui.HtmlEditor

Assembly : DevExpress.Maui.HtmlEditor.dll

NuGet Package : DevExpress.Maui.HtmlEditor

Declaration

csharp
public class StreamHtmlSource :
    HtmlSource

Remarks

The following code snippet creates a new StreamHtmlSource and specifies its Stream property. Then, it specifies the HtmlSource property to display HTML markup from a Stream with the mail.html content:

xaml
<ContentPage ...
             xmlns:dxhtml="clr-namespace:DevExpress.Maui.HtmlEditor;assembly=DevExpress.Maui.HtmlEditor"
             xmlns:dx="clr-namespace:DevExpress.Maui.Core;assembly=DevExpress.Maui.Core">
    <dx:SafeKeyboardAreaView>
        <dxhtml:HtmlEdit x:Name="htmledit"/>
    </dx:SafeKeyboardAreaView>
</ContentPage>
csharp
public partial class MainPage : ContentPage {
    public MainPage() {
        InitializeComponent();
        StreamHtmlSource htmlsource = new StreamHtmlSource();
        htmlsource.Stream = _ => FileSystem.Current.OpenAppPackageFileAsync("mail.html");
        htmledit.HtmlSource = htmlsource;
    }
}

Implements

INotifyPropertyChanged

IElementController

Inheritance

System.Object BindableObject Element DevExpress.Maui.Core.Internal.DXElementBaseCore HtmlSource StreamHtmlSource

Extension Methods

Yield<StreamHtmlSource>()

YieldIfNotNull<StreamHtmlSource>()

See Also

StreamHtmlSource Members

DevExpress.Maui.HtmlEditor Namespace