我在解析xaml字符串时有问题
(FlowDocument)(System.Windows.Markup.XamlReader.Parse(string));得到了这个异常
'Cannot create unknown type '{http://schemas.microsoft.com/winfx/2006/xaml/presentation}UnderLine'.' Line number '3' and line position '13'.字符串看起来像这样
<FlowDocument xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"><Paragraph><Bold>text</Bold></Paragraph>
<Paragraph><Italic>text</Italic></Paragraph>
<Paragraph><UnderLine>text</UnderLine></Paragraph>
...
</FlowDocument>除下划线外,其他一切都有效。有人知道问题出在哪里吗?
发布于 2015-01-30 14:09:10
修复方法是UnderLine -> Underline。
https://stackoverflow.com/questions/28237239
复制相似问题