46 StringBuilder Sb =
new();
48 foreach (
string Row
in Rows)
51 XmlDocument Doc =
new()
53 PreserveWhitespace =
true
55 Doc.LoadXml(Sb.ToString());
58 if (ParsedToken is
null)
65 Output.WriteStartElement(
"Label");
66 Output.WriteAttributeString(
"Text", ex.Message);
67 Output.WriteAttributeString(
"FontFamily",
"SpaceGroteskRegular");
68 Output.WriteAttributeString(
"TextColor",
"Red");
69 Output.WriteAttributeString(
"LineBreakMode",
"WordWrap");
70 Output.WriteEndElement();
75 Output.WriteStartElement(
"VerticalStackLayout");
76 Output.WriteAttributeString(
"HorizontalOptions",
"Center");
78 Output.WriteStartElement(
"Path");
79 Output.WriteAttributeString(
"VerticalOptions",
"Center");
80 Output.WriteAttributeString(
"HorizontalOptions",
"Center");
81 Output.WriteAttributeString(
"HeightRequest",
"16");
82 Output.WriteAttributeString(
"WidthRequest",
"16");
83 Output.WriteAttributeString(
"Aspect",
"Uniform");
84 Output.WriteAttributeString(
"Fill",
"{DynamicResource ContentPrimaryWL}");
85 Output.WriteAttributeString(
"Data",
"{x:Static ui:Geometries.TokenPath}");
86 Output.WriteEndElement();
88 Output.WriteStartElement(
"Label");
89 Output.WriteAttributeString(
"LineBreakMode",
"WordWrap");
90 Output.WriteAttributeString(
"FontSize",
"Medium");
91 Output.WriteAttributeString(
"HorizontalOptions",
"Center");
93 Output.WriteEndElement();
95 Output.WriteStartElement(
"StackLayout.GestureRecognizers");
97 Output.WriteStartElement(
"TapGestureRecognizer");
98 Output.WriteAttributeString(
"Command",
"{Binding Path=NeuroFeatureUriClicked}");
100 Output.WriteEndElement();
102 Output.WriteEndElement();
103 Output.WriteEndElement();
const string NeuroFeature
eDaler URI Scheme (edaler)
A set of never changing property constants and helpful values.
A strongly-typed resource class, for looking up localized strings, etc.
static string InvalidNeuroFeatureToken
Looks up a localized string similar to Invalid Neuro-Feature token..
Base class that references services in the app.
static IReportingStringLocalizer Localizer
Localization service
void Register(MarkdownDocument Document)
Registers the Markdown document in which the construct resides.
MarkdownDocument? Document
Markdown document.
bool EvaluatesScript
If script is evaluated for this type of code block.
async Task< bool > RenderMauiXaml(MauiXamlRenderer Renderer, string[] Rows, string Language, int Indent, MarkdownDocument Document)
Generates Maui XAML
NeuroFeatureCodeBlock()
Handles embedded tokens.
Grade Supports(string Language)
How much the module supports code of a given language (i.e. type of content)
Renders XAML (Maui flavour) from a Markdown document.
readonly XmlWriter XmlOutput
XML output
static async Task< Token > TryParse(XmlElement Xml)
Tries to parse a Token.
string FriendlyName
A friendly name for the token.
string ToXml()
Exports the token to XML.
Contains a markdown document. This markdown document class supports original markdown,...
Interface for code content Maui XAML renderers.
Interface for all markdown handlers of code content.