FlowDocument 动态加载并显示Xaml

来源:互联网 发布:淘宝网冬季女羽绒服 编辑:程序博客网 时间:2024/05/17 07:49

FlowDocument 动态加载并显示Xaml

     Object objectXaml;                Byte[] bytes = Encoding.UTF8.GetBytes(xamlString);                MemoryStream memoryStream = new MemoryStream(bytes);                XmlTextReader xmlTextReader = new XmlTextReader(memoryStream);                objectXaml = XamlReader.Load(xmlTextReader);                if (objectXaml is FlowDocument)                {                    FlowDocument flowDocument = objectXaml as FlowDocument;                    richTextBox.Document = flowDocument;                }


 

原创粉丝点击