MarkupConverter
MarkupConverter copied to clipboard
Html "BACKGROUND-COLOR=windows" results in Background black
The HtmlToXamlConveter miss handles the following html fragment
#-- Html Fragment ---
<P style="TEXT-ALIGN: left"><SPAN style="COLOR: black"><SPAN
style="BACKGROUND-COLOR: window"><SPAN
style="FONT-SIZE: 9pt; FONT-FAMILY: Segoe UI">The </SPAN><SPAN
style="COLOR: red">gospel </SPAN><SPAN style="COLOR: black">was </SPAN><SPAN
style="COLOR: blue">heard </SPAN><SPAN style="COLOR: black">by the </SPAN><SPAN
style="COLOR: seagreen">saints</SPAN></SPAN></SPAN></P>
--- end Html fragment ---
Note: the <SPAN style="BACKGROUND-COLOR: window">
This is miss handled to the following.
XamlText = HtmlToXamlConverter.ConvertHtmlToXaml(htmlFragment, false);
#--- XamlText result ---
<Section xml:space="preserve" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"><Paragraph TextAlignment="left"><Span Foreground="black"><Span Background="black"><Run FontSize="9pt" FontFamily="segoe ui">The </Run><Run Foreground="red">gospel </Run><Run Foreground="black">was </Run><Run Foreground="blue">heard </Run><Run Foreground="black">by the </Run><Run Foreground="seagreen">saints</Run></Span></Span></Paragraph></Section>
Note the <Span Foreground="black">
Found work around by removing the following the result has no background color:
style="BACKGROUND-COLOR: window"