maui-devexpress-dot-maui-dot-htmleditor-90b958db.md
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
public class StreamHtmlSource :
HtmlSource
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:
<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>
public partial class MainPage : ContentPage {
public MainPage() {
InitializeComponent();
StreamHtmlSource htmlsource = new StreamHtmlSource();
htmlsource.Stream = _ => FileSystem.Current.OpenAppPackageFileAsync("mail.html");
htmledit.HtmlSource = htmlsource;
}
}
System.Object BindableObject Element DevExpress.Maui.Core.Internal.DXElementBaseCore HtmlSource StreamHtmlSource
YieldIfNotNull<StreamHtmlSource>()
See Also