3using System.Globalization;
47 StringBuilder sb =
new();
49 foreach (
string Row
in Rows)
52 XmlDocument Doc =
new()
54 PreserveWhitespace =
true
56 Doc.LoadXml(sb.ToString());
62 Output.WriteStartElement(
"Label");
63 Output.WriteAttributeString(
"Text", ex.Message);
64 Output.WriteAttributeString(
"FontFamily",
"Courier New");
65 Output.WriteAttributeString(
"TextColor",
"Red");
66 Output.WriteAttributeString(
"LineBreakMode",
"WordWrap");
67 Output.WriteEndElement();
72 Output.WriteStartElement(
"VerticalStackLayout");
73 Output.WriteAttributeString(
"HorizontalOptions",
"Center");
75 bool ImageShown =
false;
79 (
string? FileName,
int Width,
int Height) = await PhotosLoader.LoadPhotoAsTemporaryFile(Identity.
Attachments,
82 if (!
string.IsNullOrEmpty(FileName))
84 Output.WriteStartElement(
"Image");
85 Output.WriteAttributeString(
"Source", FileName);
86 Output.WriteAttributeString(
"WidthRequest", Width.ToString(CultureInfo.InvariantCulture));
87 Output.WriteAttributeString(
"HeightRequest", Height.ToString(CultureInfo.InvariantCulture));
88 Output.WriteEndElement();
96 Output.WriteStartElement(
"Path");
97 Output.WriteAttributeString(
"VerticalOptions",
"Center");
98 Output.WriteAttributeString(
"HorizontalOptions",
"Center");
99 Output.WriteAttributeString(
"HeightRequest",
"16");
100 Output.WriteAttributeString(
"WidthRequest",
"16");
101 Output.WriteAttributeString(
"Aspect",
"Uniform");
102 Output.WriteAttributeString(
"Fill",
"{AppThemeBinding Light={StaticResource PrimaryForegroundLight}, Dark={StaticResource PrimaryForegroundDark}}");
103 Output.WriteAttributeString(
"Data",
"{x:Static ui:Geometries.PersonPath}");
104 Output.WriteEndElement();
107 Output.WriteStartElement(
"Label");
108 Output.WriteAttributeString(
"LineBreakMode",
"WordWrap");
109 Output.WriteAttributeString(
"FontSize",
"Medium");
110 Output.WriteAttributeString(
"HorizontalOptions",
"Center");
112 Output.WriteEndElement();
114 Output.WriteStartElement(
"VerticalStackLayout.GestureRecognizers");
116 StringBuilder Xml =
new();
117 Identity.
Serialize(Xml,
true,
true,
true,
true,
true,
true,
true);
119 Output.WriteStartElement(
"TapGestureRecognizer");
120 Output.WriteAttributeString(
"Command",
"{Binding Path=IotIdUriClicked}");
122 Output.WriteEndElement();
124 Output.WriteEndElement();
125 Output.WriteEndElement();
const int DefaultImageHeight
The default height to use when generating QR Code images.
const int DefaultImageWidth
The default width to use when generating QR Code images.
const string IotId
The IoT ID URI Scheme (iotid)
A set of never changing property constants and helpful values.
Handles embedded Legal IDs.
void Register(MarkdownDocument Document)
Registers the Markdown document in which the construct resides.
Grade Supports(string Language)
How much the module supports code of a given language (i.e. type of content)
async Task< bool > RenderMauiXaml(MauiXamlRenderer Renderer, string[] Rows, string Language, int Indent, MarkdownDocument Document)
Generates Maui XAML
MarkdownDocument? Document
Markdown document.
IoTIdCodeBlock()
Handles embedded Legal IDs.
bool EvaluatesScript
If script is evaluated for this type of code block.
Renders XAML (Maui flavour) from a Markdown document.
readonly XmlWriter XmlOutput
XML output
Contains a markdown document. This markdown document class supports original markdown,...
void Serialize(StringBuilder Xml, bool IncludeNamespace, bool IncludeIdAttribute, bool IncludeClientSignature, bool IncludeAttachments, bool IncludeStatus, bool IncludeServerSignature, bool IncludeAttachmentReferences)
Serializes the identity to XML
static LegalIdentity Parse(XmlElement Xml)
Parses an identity from its XML representation
Attachment[] Attachments
Attachments assigned to the legal identity.
Interface for code content Maui XAML renderers.
Interface for all markdown handlers of code content.