Markdown

Inherits from Xamarin.Forms.ContentView

Another way that information is often styled in Rock is with something called Markdown. This syntax allows the user to indicate that they want things formatted in a certain fashion, but it does not give them the ability to specify exactly how that formatting is done. For example, they can specify that they want a heading, but they don't get to pick exactly how that heading is formatted.

Not everything in the Markdown syntax is supported, for example tables and footnotes are not supported. But most of your basic syntax will be supported. As with the Html view, you will probably want to wrap your content in a CDATA tag.

When converting the markdown to XAML the Markdown control will add StyleClasses for you. Headings will get .heading1-.heading6, paragraphs will be assigned the .text class and links will be assigned the .link CSS class.

Note: Links are only clickable at a leaf block level (Xamarin.Forms formatted strings doesn't support span user interactions) : if a leaf block contains more than one link, the user is prompted. This is almost a feature since text may be too small to be precise enough! ;)

Properties

Property

Type

Description

Text

string

The markdown text to be displayed.

Lava

bool

If true then the Text will be processed for any Lava before final rendering happens. Defaults to false.

Example

<Rock:Markdown>
    <![CDATA[
# Heading

This is some **bold** text.
    ]]>
</Rock:Markdown>

Last updated

⚙️ Powered by Rock RMS