Skip to content

Commit a7e10f3

Browse files
Merge pull request #3614 from syncfusion-content/update-sunburst-markdown-UG-master
973017 Addressed sunburst and markdown viewer suggestions and updated API hyperlinks [Master]
2 parents bcf0625 + f8de09c commit a7e10f3

File tree

11 files changed

+216
-143
lines changed

11 files changed

+216
-143
lines changed

MAUI/MarkdownViewer/Appearance.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ documentation: ug
99

1010
# Customize Appearance in .NET MAUI SfMarkdownViewer
1111

12-
The [SfMarkdownViewer]() control in .NET MAUI provides a powerful styling system through the `MarkdownStyleSettings` class. This allows developers to customize the visual presentation of Markdown content with precision and flexibility.
12+
The [SfMarkdownViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.MarkdownViewer.SfMarkdownViewer.html) control in .NET MAUI provides a powerful styling system through the [MarkdownStyleSettings](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.MarkdownViewer.MarkdownStyleSettings.html) class. This allows developers to customize the visual presentation of Markdown content with precision and flexibility.
1313

1414
## Key Features
1515

@@ -29,15 +29,14 @@ The [SfMarkdownViewer]() control in .NET MAUI provides a powerful styling system
2929

3030
The appearance of headings and body content in SfMarkdownViewer can be customized using the MarkdownStyleSettings class.
3131

32-
- [H1FontSize](), [H2FontSize](), [H3FontSize]() – Gets or sets the font size for H1, H2, and H3 heading elements respectively.
33-
- [H1Color](), [H2Color](), [H3Color]() – Gets or sets the text color for H1, H2, and H3 heading elements respectively.
34-
- [BodyFontSize]() – Gets or sets the font size for regular paragraph text.
35-
36-
- [BodyTextColor]() – Gets or sets the text color for body content.
37-
- [TableHeaderFontSize](), [TableDataFontSize]() – Gets or sets the font size for table headers and table content respectively.
38-
- [TableHeaderTextColor](), [TableDataTextColor]() – Gets or sets the text color for table headers and table content respectively.
39-
- [TableBackground]() – Gets or sets the background color for the entire table area.
40-
- [CssStyleRules]() – Gets or sets raw CSS styles to override or extend default Markdown rendering behavior.
32+
- [H1FontSize](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.MarkdownViewer.MarkdownStyleSettings.html#Syncfusion_Maui_MarkdownViewer_MarkdownStyleSettings_H1FontSize), [H2FontSize](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.MarkdownViewer.MarkdownStyleSettings.html#Syncfusion_Maui_MarkdownViewer_MarkdownStyleSettings_H2FontSize), [H3FontSize](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.MarkdownViewer.MarkdownStyleSettings.html#Syncfusion_Maui_MarkdownViewer_MarkdownStyleSettings_H3FontSize) – Gets or sets the font size for H1, H2, and H3 heading elements respectively.
33+
- [H1Color](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.MarkdownViewer.MarkdownStyleSettings.html#Syncfusion_Maui_MarkdownViewer_MarkdownStyleSettings_H1Color), [H2Color](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.MarkdownViewer.MarkdownStyleSettings.html#Syncfusion_Maui_MarkdownViewer_MarkdownStyleSettings_H2Color), [H3Color](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.MarkdownViewer.MarkdownStyleSettings.html#Syncfusion_Maui_MarkdownViewer_MarkdownStyleSettings_H3Color) – Gets or sets the text color for H1, H2, and H3 heading elements respectively.
34+
- [BodyFontSize](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.MarkdownViewer.MarkdownStyleSettings.html#Syncfusion_Maui_MarkdownViewer_MarkdownStyleSettings_BodyFontSize) – Gets or sets the font size for regular paragraph text.
35+
- [BodyTextColor](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.MarkdownViewer.MarkdownStyleSettings.html#Syncfusion_Maui_MarkdownViewer_MarkdownStyleSettings_BodyTextColor) – Gets or sets the text color for body content.
36+
- [TableHeaderFontSize](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.MarkdownViewer.MarkdownStyleSettings.html#Syncfusion_Maui_MarkdownViewer_MarkdownStyleSettings_TableHeaderFontSize), [TableDataFontSize](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.MarkdownViewer.MarkdownStyleSettings.html#Syncfusion_Maui_MarkdownViewer_MarkdownStyleSettings_TableDataFontSize) – Gets or sets the font size for table headers and table content respectively.
37+
- [TableHeaderTextColor](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.MarkdownViewer.MarkdownStyleSettings.html#Syncfusion_Maui_MarkdownViewer_MarkdownStyleSettings_TableHeaderTextColor), [TableDataTextColor](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.MarkdownViewer.MarkdownStyleSettings.html#Syncfusion_Maui_MarkdownViewer_MarkdownStyleSettings_TableDataTextColor) – Gets or sets the text color for table headers and table content respectively.
38+
- [TableBackground](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.MarkdownViewer.MarkdownStyleSettings.html#Syncfusion_Maui_MarkdownViewer_MarkdownStyleSettings_TableBackground) – Gets or sets the background color for the entire table area.
39+
- [CssStyleRules](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.MarkdownViewer.MarkdownStyleSettings.html#Syncfusion_Maui_MarkdownViewer_MarkdownStyleSettings_CssStyleRules) – Gets or sets raw CSS styles to override or extend default Markdown rendering behavior.
4140

4241
{% tabs %}
4342
{% highlight xaml %}
@@ -97,4 +96,4 @@ The following output shows how these style settings enhance the appearance of re
9796

9897
![Sample markdown content appearance customization](images/maui-markdown-viewer-appearance.png)
9998

100-
With [MarkdownStyleSettings](), you gain full control over how Markdown content looks in your .NET MAUI app, whether you're building a documentation viewer, a note-taking app, or a styled content portal.
99+
With [MarkdownStyleSettings](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.MarkdownViewer.MarkdownStyleSettings.html), you gain full control over how Markdown content looks in your .NET MAUI app, whether you're building a documentation viewer, a note-taking app, or a styled content portal.

MAUI/MarkdownViewer/ContentRetrieval.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ documentation: ug
99

1010
# Retrieve Content Programmatically in .NET MAUI SfMarkdownViewer
1111

12-
The [SfMarkdownViewer]() control provides built-in methods to retrieve and transform Markdown content programmatically. These methods allow developers to access the raw Markdown, convert it to HTML, or extract plain text without formatting.
12+
The [SfMarkdownViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.MarkdownViewer.SfMarkdownViewer.html) control provides built-in methods to retrieve and transform Markdown content programmatically. These methods allow developers to access the raw Markdown, convert it to HTML, or extract plain text without formatting.
1313

14-
## GetMarkdownText()
14+
## GetMarkdownText
1515

16-
Retrieves the raw Markdown content currently assigned to the `Source` property of the [SfMarkdownViewer]() control.
16+
Retrieves the raw Markdown content currently assigned to the [Source](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.MarkdownViewer.SfMarkdownViewer.html#Syncfusion_Maui_MarkdownViewer_SfMarkdownViewer_Source) property of the [SfMarkdownViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.MarkdownViewer.SfMarkdownViewer.html) control.
1717

1818
{% tabs %}
1919
{% highlight C# hl_lines="12" %}
@@ -29,13 +29,13 @@ Retrieves the raw Markdown content currently assigned to the `Source` property o
2929
}
3030
. . .
3131

32-
string markdown = MarkdownViewer.GetMarkdown();
32+
string markdown = markdownViewer.GetMarkdownText();
3333
}
3434

3535
{% endhighlight %}
3636
{% endtabs %}
3737

38-
## GetHtml()
38+
## GetHtmlText
3939

4040
Converts the Markdown content of the SfMarkdownViewer control into HTML format and provides the result as a string.
4141

@@ -53,15 +53,15 @@ Converts the Markdown content of the SfMarkdownViewer control into HTML format a
5353
}
5454
. . .
5555

56-
string html = MarkdownViewer.GetHtml();
56+
string html = markdownViewer.GetHtmlText();
5757
}
5858

5959
{% endhighlight %}
6060
{% endtabs %}
6161

62-
## GetText()
62+
## GetText
6363

64-
Extracts the plain text content from the Markdown assigned to the `SfMarkdownViewer` control, removing all Markdown formatting such as headings, emphasis, links, and code blocks.
64+
Extracts the plain text content from the Markdown assigned to the [SfMarkdownViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.MarkdownViewer.SfMarkdownViewer.html) control, removing all Markdown formatting such as headings, emphasis, links, and code blocks.
6565

6666
{% tabs %}
6767
{% highlight C# hl_lines="12" %}

MAUI/MarkdownViewer/MarkdownSources.md renamed to MAUI/MarkdownViewer/DataBinding.md

Lines changed: 12 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ documentation: ug
99

1010
# Loading Markdown Content in .NET MAUI MarkdownViewer
1111

12-
The [SfMarkdownViewer]() control supports flexible input sources, allowing developers to load Markdown content from strings, local files, embedded resources, and external URLs.
12+
The [SfMarkdownViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.MarkdownViewer.SfMarkdownViewer.html) control supports flexible input sources, allowing developers to load Markdown content from strings, local files, embedded resources, and external URLs.
1313

1414
## From String
1515

16-
Assign a Markdown-formatted string to the `Source` property of the SfMarkdownViewer control to render markdown content directly within your application.
16+
Assign a Markdown-formatted string to the [Source](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.MarkdownViewer.SfMarkdownViewer.html#Syncfusion_Maui_MarkdownViewer_SfMarkdownViewer_Source) property of the [SfMarkdownViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.MarkdownViewer.SfMarkdownViewer.html) control to render markdown content directly within your application.
1717

1818
{% tabs %}
1919
{% highlight xaml %}
@@ -71,19 +71,7 @@ namespace MarkdownViewerGettingStarted
7171

7272
## From Local File
7373

74-
To load Markdown content from a local `.md` file, you can directly specify the file path and read its contents using standard file I/O and assign its content to the `Source` property of the `SfMarkdownViewer`.
75-
76-
**XAML**
77-
78-
{% highlight xaml %}
79-
80-
<ContentPage>
81-
82-
<markdown:SfMarkdownViewer x:Name="MarkdownViewer" />
83-
84-
</ContentPage>
85-
86-
{% endhighlight %}
74+
To load Markdown content from a local `.md` file, you can directly specify the file path and read its contents using standard file I/O and assign its content to the [Source](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.MarkdownViewer.SfMarkdownViewer.html#Syncfusion_Maui_MarkdownViewer_SfMarkdownViewer_Source) property of the [SfMarkdownViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.MarkdownViewer.SfMarkdownViewer.html).
8775

8876
Use the following code-behind to read the file and assign its content to the Markdown Viewer:
8977

@@ -96,10 +84,11 @@ public partial class MainPage : ContentPage
9684
public MainPage()
9785
{
9886
InitializeComponent();
99-
87+
SfMarkdownViewer markdownViewer = new SfMarkdownViewer();
10088
string filePath = @"D:\MAUI\MarkdownViewer\Files\MarkdownContent.md";
10189
string markdownContent = File.ReadAllText(filePath);
102-
MarkdownViewer.Source = markdownContent;
90+
markdownViewer.Source = markdownContent;
91+
Content = markdownViewer;
10392
}
10493
}
10594

@@ -108,19 +97,7 @@ public partial class MainPage : ContentPage
10897
## From Embedded Resource
10998

11099
1. To load Markdown content from an embedded resource, place the `.md` file inside the `Resources` folder of your .NET MAUI project.
111-
2. Use asynchronous file access to read and assign the content to the `Source` property of the `SfMarkdownViewer` control.
112-
113-
**XAML**
114-
115-
{% highlight xaml %}
116-
117-
<ContentPage>
118-
119-
<markdown:SfMarkdownViewer x:Name="MarkdownViewer" />
120-
121-
</ContentPage>
122-
123-
{% endhighlight %}
100+
2. Use asynchronous file access to read and assign the content to the [Source](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.MarkdownViewer.SfMarkdownViewer.html#Syncfusion_Maui_MarkdownViewer_SfMarkdownViewer_Source) property of the [SfMarkdownViewer](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.MarkdownViewer.SfMarkdownViewer.html) control.
124101

125102
Refer to the following code-behind to read the embedded resource and assign its content to the Markdown Viewer:
126103

@@ -130,18 +107,22 @@ Refer to the following code-behind to read the embedded resource and assign its
130107

131108
public partial class MainPage : ContentPage
132109
{
110+
SfMarkdownViewer markdownViewer;
111+
133112
public MainPage()
134113
{
135114
InitializeComponent();
115+
markdownViewer = new SfMarkdownViewer();
136116
_ = LoadMarkdownAsync();
117+
Content = markdownViewer;
137118
}
138119

139120
private async Task LoadMarkdownAsync()
140121
{
141122
using Stream stream = await FileSystem.OpenAppPackageFileAsync("MarkdownContent.md");
142123
using StreamReader reader = new StreamReader(stream, Encoding.UTF8);
143124
string markdownContent = await reader.ReadToEndAsync();
144-
MarkdownViewer.Source = markdownContent;
125+
markdownViewer.Source = markdownContent;
145126
}
146127
}
147128

0 commit comments

Comments
 (0)