将 XAML 转换为 FlowDocument 以在 WPF 中的 RichTextBox 中显示

2024-04-08

我有一些 HTML,我正在使用 Microsoft 提供的库将其转换为 XAML

string t = HtmlToXamlConverter.ConvertHtmlToXaml(mail.HtmlDataString,true);

现在,从如何将XAML插入RichTextBox? https://stackoverflow.com/questions/1449121/how-to-insert-xaml-into-richtextbox我正在使用以下内容:

private static FlowDocument SetRTF(string xamlString)
{
    StringReader stringReader = new StringReader(xamlString);
    System.Xml.XmlReader xmlReader = System.Xml.XmlReader.Create(stringReader);
    Section sec = XamlReader.Load(xmlReader) as Section;
    FlowDocument doc = new FlowDocument();
    while (sec.Blocks.Count > 0)
        doc.Blocks.Add(sec.Blocks.FirstBlock);
    return doc;
}

然而,不幸的是,这一直崩溃=/请问有人知道如何在 RichTextBox 中显示 XAML 文本吗?

编辑:我正在尝试转换的 html 示例

<FlowDocument xml:space="preserve" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"><Table><TableRowGroup><TableRow><TableCell BorderThickness="1,1,1,1" BorderBrush="Black"><Table><TableRowGroup><TableRow><TableCell BorderThickness="1,1,1,1" BorderBrush="Black"><Table><TableRowGroup><TableRow><TableCell BorderThickness="1,1,1,1" BorderBrush="Black"><Paragraph>Top stories for<LineBreak />Tuesday,<LineBreak />May 4, 2010</Paragraph></TableCell><TableCell BorderThickness="1,1,1,1" BorderBrush="Black"><Paragraph><Hyperlink Foreground="#555555" NavigateUri="http://adverts.timesofmalta.com/openx/www/delivery/ck.php?zoneid=7" /></Paragraph></TableCell></TableRow></TableRowGroup></Table></TableCell></TableRow></TableRowGroup></Table></TableCell></TableRow><TableRow><TableCell BorderThickness="1,1,1,1" BorderBrush="Black"><Table><TableRowGroup><TableRow><TableCell BorderThickness="1,1,1,1" BorderBrush="Black"><Table><TableRowGroup><TableRow><TableCell BorderThickness="1,1,1,1" BorderBrush="Black" RowSpan="10"><Paragraph FontSize="17px">Latest News</Paragraph></TableCell><TableCell BorderThickness="1,1,1,1" BorderBrush="Black"><Paragraph><LineBreak /><Span FontWeight="bold"><Hyperlink Foreground="#555555" NavigateUri="http://www.timesofmalta.com/articles/headlines/20100504/local">News</Hyperlink></Span><LineBreak /><Hyperlink Foreground="#555555" NavigateUri="http://www.timesofmalta.com/articles/view/20100504/local/code-breaker">Code breaker</Hyperlink><LineBreak /><Hyperlink Foreground="#555555" NavigateUri="http://www.timesofmalta.com/articles/view/20100504/local/persuni-li-spiccaw-il-habs-minhabba-kazijiet-ta-vat">106 in prison since 2004 for VAT violations</Hyperlink><LineBreak /><Hyperlink Foreground="#555555" NavigateUri="http://www.timesofmalta.com/articles/view/20100504/local/mumn-disappointed-over-deployment-of-nurses">MUMN disappointed over deployment of nurses</Hyperlink><LineBreak /><Hyperlink Foreground="#555555" NavigateUri="http://www.timesofmalta.com/articles/view/20100504/local/press-digest">Press digest</Hyperlink><LineBreak /><LineBreak /><Span FontWeight="bold"><Hyperlink Foreground="#555555" NavigateUri="http://www.timesofmalta.com/articles/headlines/20100504/world-news">World News</Hyperlink></Span><LineBreak /><Hyperlink Foreground="#555555" NavigateUri="http://www.timesofmalta.com/articles/view/20100504/world-news/new-iceland-volcano-ash-grounds-flights-in-ireland">Ash cloud returns: Ryanair cancels Malta flight from Dublin</Hyperlink><LineBreak /><Hyperlink Foreground="#555555" NavigateUri="http://www.timesofmalta.com/articles/view/20100504/world-news/man-arrested-over-ny-bomb-attempt-reports">Man arrested over NY bomb attempt: reports</Hyperlink><LineBreak /><LineBreak /></Paragraph></TableCell></TableRow></TableRowGroup></Table></TableCell></TableRow></TableRowGroup></Table></TableCell></TableRow><TableRow><TableCell BorderThickness="1,1,1,1" BorderBrush="Black"><Table><TableRowGroup><TableRow><TableCell BorderThickness="1,1,1,1" BorderBrush="Black"><Table><TableRowGroup><TableRow><TableCell BorderThickness="1,1,1,1" BorderBrush="Black" RowSpan="10"><Paragraph FontSize="17px">The Times<LineBreak /></Paragraph></TableCell><TableCell BorderThickness="1,1,1,1" BorderBrush="Black"><Paragraph><LineBreak /><Span FontWeight="bold"><Hyperlink Foreground="#555555" NavigateUri="http://www.timesofmalta.com/articles/headlines/20100504/local">News</Hyperlink></Span><LineBreak /><Hyperlink Foreground="#555555" NavigateUri="http://www.timesofmalta.com/articles/view/20100504/local/injured-president-returns-from-china">Injured President returns from China</Hyperlink><LineBreak /><Hyperlink Foreground="#555555" NavigateUri="http://www.timesofmalta.com/articles/view/20100504/local/law-breakers-to-be-barred-from-public-contracts">VAT fraud - Law breakers to be barred from public contracts</Hyperlink><LineBreak /><Hyperlink Foreground="#555555" NavigateUri="http://www.timesofmalta.com/articles/view/20100504/local/warden-assaulted-on-parking-ticket">Warden 'assaulted' on parking ticket</Hyperlink><LineBreak /><Hyperlink Foreground="#555555" NavigateUri="http://www.timesofmalta.com/articles/view/20100504/local/against-the-law">Against the law?</Hyperlink><LineBreak /><Hyperlink Foreground="#555555" NavigateUri="http://www.timesofmalta.com/articles/view/20100504/local/linkin-park-the-kooks-for-isle-of-mtv-concert">Linkin Park, The Kooks for Isle of MTV concert</Hyperlink><LineBreak /><LineBreak /><Span FontWeight="bold"><Hyperlink Foreground="#555555" NavigateUri="http://www.timesofmalta.com/articles/headlines/20100504/world-news">World News</Hyperlink></Span><LineBreak /><Hyperlink Foreground="#555555" NavigateUri="http://www.timesofmalta.com/articles/view/20100504/world-news/mumbai-attacks-gunman-convicted">Mumbai attacks gunman convicted</Hyperlink><LineBreak /><Hyperlink Foreground="#555555" NavigateUri="http://www.timesofmalta.com/articles/view/20100504/world-news/ireland-britain-eye-new-ash-flight-bans">Ireland, Britain eye new ash flight bans</Hyperlink><LineBreak /><Hyperlink Foreground="#555555" NavigateUri="http://www.timesofmalta.com/articles/view/20100504/world-news/white-male-suspect-linked-to-times-square-car-bomb">White male suspect linked to Times Square car bomb</Hyperlink><LineBreak /><Hyperlink Foreground="#555555" NavigateUri="http://www.timesofmalta.com/articles/view/20100504/world-news/iranian-president-blasts-us-for-nuclear-threats">Iranian President blasts US for nuclear threats</Hyperlink><LineBreak /><Hyperlink Foreground="#555555" NavigateUri="http://www.timesofmalta.com/articles/view/20100504/world-news/strikes-to-disrupt-greek-flights-as-from-today">Strikes to disrupt Greek flights as from today</Hyperlink><LineBreak /><LineBreak /><Span FontWeight="bold"><Hyperlink Foreground="#555555" NavigateUri="http://www.timesofmalta.com/articles/headlines/20100504/business">Business &amp; Finance</Hyperlink></Span><LineBreak /><Hyperlink Foreground="#555555" NavigateUri="http://www.timesofmalta.com/articles/view/20100504/business/ecb-returns-to-variable-rate-tender-procedures">Money market report - week ended April 30 - ECB returns to variable rate tender procedures</Hyperlink><LineBreak /><Hyperlink Foreground="#555555" NavigateUri="http://www.timesofmalta.com/articles/view/20100504/business/new-chairman-for-volksbank-malta-ltd">New chairman for Volksbank Malta Ltd</Hyperlink><LineBreak /><Hyperlink Foreground="#555555" NavigateUri="http://www.timesofmalta.com/articles/view/20100504/business/daily-currency-report">Daily currency report</Hyperlink><LineBreak /><Hyperlink Foreground="#555555" NavigateUri="http://www.timesofmalta.com/articles/view/20100504/business/financial-news">Financial news</Hyperlink><LineBreak /><Hyperlink Foreground="#555555" NavigateUri="http://www.timesofmalta.com/articles/view/20100504/business/european-stocks-shake-off-early-jitters-and-gain-ground">Market overview - European stocks shake off early jitters and gain ground</Hyperlink><LineBreak /><LineBreak /><Span FontWeight="bold"><Hyperlink Foreground="#555555" NavigateUri="http://www.timesofmalta.com/articles/headlines/20100504/sport">Sport</Hyperlink></Span><LineBreak /><Hyperlink Foreground="#555555" NavigateUri="http://www.timesofmalta.com/articles/view/20100504/sport/valletta-part-with-obrien">Football - Valletta part with O'Brien</Hyperlink><LineBreak /><Hyperlink Foreground="#555555" NavigateUri="http://www.timesofmalta.com/articles/view/20100504/sport/title-clinching-goal-just-reward-for-ebullient-bajada">Football - BOV Premier League - Title-clinching goal just reward for ebullient Bajada</Hyperlink><LineBreak /><Hyperlink Foreground="#555555" NavigateUri="http://www.timesofmalta.com/articles/view/20100504/sport/draw-enough-for-sliema-to-secure-third-place">Football - BOV Premier League - Draw enough for Sliema to secure third place</Hyperlink><LineBreak /><Hyperlink Foreground="#555555" NavigateUri="http://www.timesofmalta.com/articles/view/20100504/sport/bov-premier-league-highlights">Football - BOV Premier League highlights</Hyperlink><LineBreak /><Hyperlink Foreground="#555555" NavigateUri="http://www.timesofmalta.com/articles/view/20100504/sport/mqabba-finish-on-a-high">Football - Mqabba finish on a high</Hyperlink><LineBreak /><LineBreak /><Span FontWeight="bold"><Hyperlink Foreground="#555555" NavigateUri="http://www.timesofmalta.com/articles/headlines/20100504/opinion">Opinion</Hyperlink></Span><LineBreak /><Hyperlink Foreground="#555555" NavigateUri="http://www.timesofmalta.com/articles/view/20100504/opinion/editorial">Editorial - Keeping to the right financial track</Hyperlink><LineBreak /><Hyperlink Foreground="#555555" NavigateUri="http://www.timesofmalta.com/articles/view/20100504/opinion/habitats-of-the-maltese-islands-7">One World - Habitats of the Maltese islands (7)</Hyperlink><LineBreak /><Hyperlink Foreground="#555555" NavigateUri="http://www.timesofmalta.com/articles/view/20100504/opinion/guaranteeing-our-heritages-future">Guaranteeing our heritage's future</Hyperlink><LineBreak /><Hyperlink Foreground="#555555" NavigateUri="http://www.timesofmalta.com/articles/view/20100504/opinion/mixed-data-on-environment">Mixed data on environment</Hyperlink><LineBreak /><Hyperlink Foreground="#555555" NavigateUri="http://www.timesofmalta.com/articles/view/20100504/opinion/an-issue-of-accountability">An issue of accountability</Hyperlink><LineBreak /><LineBreak /><Span FontWeight="bold"><Hyperlink Foreground="#555555" NavigateUri="http://www.timesofmalta.com/articles/headlines/20100504/letters">Letters</Hyperlink></Span><LineBreak /><Hyperlink Foreground="#555555" NavigateUri="http://www.timesofmalta.com/articles/view/20100504/letters/service-deserving-of-a-national-award">Service deserving of a national award</Hyperlink><LineBreak /><Hyperlink Foreground="#555555" NavigateUri="http://www.timesofmalta.com/articles/view/20100504/letters/vulgar-perception-of-latin-language">Vulgar perception of Latin language</Hyperlink><LineBreak /><Hyperlink Foreground="#555555" NavigateUri="http://www.timesofmalta.com/articles/view/20100504/letters/chemical-spray-used-on-potato-crops">Chemical spray used on potato crops</Hyperlink><LineBreak /><Hyperlink Foreground="#555555" NavigateUri="http://www.timesofmalta.com/articles/view/20100504/letters/blasted-from-the-past-1">Blasted from the past (1)</Hyperlink><LineBreak /><Hyperlink Foreground="#555555" NavigateUri="http://www.timesofmalta.com/articles/view/20100504/letters/blasted-from-the-past-2">Blasted from the past (2)</Hyperlink><LineBreak /><LineBreak /></Paragraph></TableCell></TableRow></TableRowGroup></Table></TableCell></TableRow></TableRowGroup></Table></TableCell></TableRow></TableRowGroup></Table></FlowDocument>

我认为它崩溃了Add()因为你要添加一个FrameworkContentElement它已经有一个逻辑父对象。您必须先删除一个Block从其父集合中删除,然后将其添加到不同的集合中。尝试这个:

private static FlowDocument SetRTF(string xamlString)
{
    StringReader stringReader = new StringReader(xamlString);
    System.Xml.XmlReader xmlReader = System.Xml.XmlReader.Create(stringReader);
    Section sec = XamlReader.Load(xmlReader) as Section;
    FlowDocument doc = new FlowDocument();
    while (sec.Blocks.Count > 0)
    {
        var block = sec.Blocks.FirstBlock;
        sec.Blocks.Remove(block);
        doc.Blocks.Add(block);
    }
    return doc;
}

如果您的 XAML 已经代表 FlowDocument

那么事情就简单多了。只需做一个:

    private static FlowDocument SetRTF(string xamlString)
    {
        StringReader stringReader = new StringReader(xamlString);
        System.Xml.XmlReader xmlReader = System.Xml.XmlReader.Create(stringReader);
        return XamlReader.Load(xmlReader) as FlowDocument;
    }

Usage

richTextBox.Document = SetRTF(xamlString);

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

将 XAML 转换为 FlowDocument 以在 WPF 中的 RichTextBox 中显示 的相关文章

  • 从 Invoke 方法获取 RETURN

    我正在尝试从另一个线程上的列表框项目中读取值 我尝试创建一种新方法来运行调用命令 我可以设法将命令发送到列表框 例如通过调用方法添加 但我似乎无法得到响应 我似乎无法获取该项目的值 我尝试了几种方法 一旦我将它从空变为字符串 事情就开始变得
  • Nullable 是不可能的,为什么不呢? [复制]

    这个问题在这里已经有答案了 如果这是一个愚蠢的问题 请原谅 我正在尝试更好地理解 Net 中的 Nullable 类型 从我从 Microsoft 源代码 使用 ReSharper 中注意到的内容 我了解到 Nullable 是一个结构 而
  • .pdbs 会减慢发布应用程序的速度吗?

    如果 dll 中包含 pdb 程序调试 文件 则行号将出现在引发的任何异常的堆栈跟踪中 这会影响应用程序的性能吗 这个问题与发布与调试 即优化 无关 这是关于拥有 pdb 文件的性能影响 每次抛出异常时都会读取 pdb 文件吗 加载程序集时
  • 为什么在 C++ 中声明枚举时使用 typedef?

    我已经很多年没有写过任何 C 了 现在我正试图重新开始 然后我遇到了这个并考虑放弃 typedef enum TokenType blah1 0x00000000 blah2 0X01000000 blah3 0X02000000 Toke
  • 如何调试在发布版本中优化的变量

    我用的是VS2010 我的调试版本工作正常 但我的发布版本不断崩溃 因此 在发布版本模式下 我右键单击该项目 选择 调试 然后选择 启动新实例 此时我看到我声明的一个数组 int ma 4 1 2 8 4 永远不会被初始化 关于可能发生的事
  • 虚拟并行端口模拟器

    在我的计算机网络课程中 我们应该通过使用本机寄存器 例如使用 outportb 等命令 来学习并行端口编程 我没有并行端口 因为我住在 2011 年 但想练习这些程序 我使用 dosbox 安装了旧的 Turboc 3 IDE 有没有一个程
  • C 类型命名约定,_t 或 ALLCAPS

    我一直想知道是否有任何命名约定 例如何时对类型使用全部大写以及何时追加 t 什么时候不使用任何东西 我知道当时 K R 发布了各种有关如何使用 C 的文档 但我找不到任何相关内容 在 C 标准库类型中 t看起来漂亮占主导地位 time t
  • 如何增加ofstream的缓冲区大小

    我想增加 C 程序的缓冲区大小 以便它不会过于频繁地写入 默认缓冲区是 8192 字节 我尝试使用 pubsetbuf 将其增加到 200K 原始代码 ofstream fq fastq1 cstr ios out fastq1 is a
  • 在 C 语言中替换宏内的宏

    我正在尝试使代码部分可重用 我下面的评论片段没有达到我想要的效果 define NAME ABC define LOG SIZE NAME LEN 我想LOG SIZE决心ABC LEN 我尝试过使用 但没能让它发挥作用 LOG SIZE在
  • 是否可以在Linux上将C转换为asm而不链接libc?

    测试平台为Linux 32位 但也欢迎 Windows 32 位上的某些解决方案 这是一个c代码片段 int a 0 printf d n a 如果我使用 gcc 生成汇编代码 gcc S test c 然后我会得到 movl 0 28 e
  • 将 2 个字节转换为整数

    我收到一个 2 个字节的端口号 最低有效字节在前 我想将其转换为整数 以便我可以使用它 我做了这个 char buf 2 Where the received bytes are char port 2 port 0 buf 1 port
  • 如何对STL向量进行排序?

    我想排序一个vector vector
  • 选择 asp.net CheckBoxList 中的所有项目

    ASP NET 和 C 我想要一个带有 全选 项目的复选框列表 当这个特定项目是 已选择 所有其他都将被选择 也 当选择被删除时 这个项目 也将来自所有人 其他物品 选中 取消选中 任何其他项目只会有一个 对特定项目的影响 无论选择状态如何
  • 测验;这个编译了吗?如果是的话它会返回什么(我知道答案)

    我最近发现这个错字 if name find string npos 显然开发者的意思是输入 if name find string npos 但令我惊讶的是发现错误甚至编译 Wall Werror 没有尝试过 pedantic 那么 咖啡
  • 在 Qt 中播放通知(频率 x)声音 - 最简单的方法?

    Qt 5 1 或更高版本 我需要播放频率为 x 的通知声音 n 毫秒 如果我能像这样组合音调那就太好了 1000Hz 持续 2 秒 然后 3000Hz 持续 1 秒 最简单的方法是使用文件 WAV MP3 例如如此处所述 如何用Qt播放声音
  • 如何测试某些代码在 C++ 中无法编译? [复制]

    这个问题在这里已经有答案了 可能的重复 单元测试编译时错误 https stackoverflow com questions 605915 unit test compile time error 我想知道是否可以编写一种单元测试来验证给
  • 如何调用与现有方法同名的扩展方法? [复制]

    这个问题在这里已经有答案了 我有这样的代码 public class TestA public string ColA get set public string ColB get set public string ColC get se
  • 时间:2019-03-17 标签:c#TimerStopConfusion

    我想通过单击按钮时更改文本颜色来将文本框文本设置为 闪烁 我可以让文本按照我想要的方式闪烁 但我希望它在闪烁几次后停止 我不知道如何在计时器触发几次后让它停止 这是我的代码 public Form1 InitializeComponent
  • 在 C 中使用 #define 没有任何价值

    If a define没有任何价值地使用 例如 define COMMAND SPI 默认值是0吗 不 它的评估结果为零 从字面上看 该符号被替换为空 然而 一旦你有了 define FOO 预处理器条件 ifdef FOO现在将是真的 另
  • Unity,c++ 本机插件字节数组不匹配

    在我的 C 本机插件中 我有一个调用 vector

随机推荐

  • 调用对象的多个方法?

    我尝试在单个对象上调用多个函数 但我认为我的语法失败了 你能纠正我吗 objMetaDaten gt setStrTitle test gt setStrBeschreibung test gt setStrUeberschrift tes
  • 如何删除 csv 文件中的整行并将更改保存在同一文件上?

    我是 python 新手 尝试修改 csv 文件 以便我能够根据给定列表删除具有特定字段的特定行 在我当前的代码中 我得到了我想要删除的行 但我无法删除它并将更改保存在同一文件上 替换 import os sys glob import t
  • Laravel 5.3 约束渴望加载不起作用

    我有两个型号User and Profile处于一对一的关系中 我想检索所有用户所在位置profile status TRUE使用以下代码 users User with profile gt function query query gt
  • MATLAB 版本 7 中的 pdist2 等效项

    我需要在matlab中计算两个矩阵之间的欧几里德距离 目前我正在使用 bsxfun 并计算距离 如下所示 我附上代码片段 for i 1 4754 test data fea test i d sqrt sum bsxfun minus t
  • Git RPC 失败;结果=22,HTTP 代码=400

    我在 StackOverflow 上阅读过 发现了与我类似的情况 但没有一个足够接近让我弄清楚下一步应该做什么 我正在尝试提取构建我正在开发的项目 git clone 所需的库的新副本 我发出以下命令 启用 GIT CURL VERBOSE
  • 必要时无法加载 Opencv 库

    我尝试在使用 OpenCV 的必要项目中使用相机 我在 pro 文件中有这个 INCLUDEPATH C OpenCV 2 3 1 android bin OpenCV 2 3 1 include C OpenCV 2 3 1 androi
  • 如何在 jQuery 中触发两个元素的 mouseout 事件?

    假设我有两个独立的 div A 和 B 它们在一个角处重叠 A B 我想在鼠标离开时触发一个事件bothA和B 我试过这个 a b mouseleave function 但如果鼠标离开任一节点 则会触发该事件 我希望一旦鼠标不在任何一个节
  • Zurb Foundation 5:网格列堆叠

    我是基础新手 我只知道如何使用网格的基本概念 I have these 3 columns that need to be stacked see mobile image when viewed on mobile small scree
  • 在 Dart 中不继承静态变量的理由是什么?

    In Dart 如果一个类扩展了另一个类 则扩展类继承所有超类的非静态变量 但不继承其任何静态变量 例如 class TestUpper static final String up super String upup 10 class T
  • “DOM 0 方式”检索 HTML 属性值

    jQuery 有一个attr 检索给定 HTML 属性值的方法 例如 var foo document getElementById foo foo attr id 但是 从性能角度来看 这并不是最佳选择 因为必须创建 jQuery 对象才
  • 在 iOS 应用程序中以编程方式获取崩溃报告

    我想在我的应用程序内访问我的应用程序的崩溃报告 并且我需要将崩溃报告发送到服务器 我在 google 中搜索 找不到任何可以帮助我实现目的的 API 但我发现有一些开源项目 例如 QuincyKit plcrashreporter 用于获取
  • Dart 内部的 wait 到底做了什么?

    我正在开发一个需要使用本地存储的颤振应用程序 由于Android中的文档目录路径将在Future中给出 因此每次我想使用该路径时 我都必须检查future是否完成 代码可能类似于下面 class DataStructure late Fut
  • 使用应用程序脚本更新多个选项卡

    我有一张名为 Main Sheet 的工作表 Col B 中的每个列值都有多个选项卡 东 中 每周都会有新记录添加到主表中 我想要一个谷歌应用程序脚本函数将新行从 Main Sheet 选项卡插入到相应的选项卡 输入表 主表 输出表东方 中
  • 在 R 中使用 knitr 和 markdown 自定义 CSS

    我发现了这个很棒的教程 介绍如何修改在 Rstudio 中使用 markdown 和 knit 创建的 HTML 报告的 css 格式 帖子可以找到here http nsaunders wordpress com 2012 08 27 c
  • Html.BeginForm 外部的提交按钮

    在我的页面上 我有来自母版页的工具栏和一些输入字段 所有输入字段都在标签内form和标签外部的工具栏form 按下外部按钮后是否可以提交表单form tag 请建议 亚历山大 你可以用 JavaScript 来做到这一点
  • ems和像素之间有什么关系?

    em 的像素值是多少 10em px em 和 px 之间没有特定的关系 它是根据每个字体的 m 字符的宽度计算的
  • 添加加载指示器/进度条到 Phonegap Android 闪屏

    我有一个 PhoneGap 1 4 1 jQueryMobile 1 0 1 Android 项目 它显示 res drawable splash png 很好 一旦加载 WebView 闪屏就会消失 我想在启动画面中添加某种进度指示器百分
  • Android Studio ML 套件无法加载 OCR 模块

    我正在开发一个涉及 ML 套件的 Android 应用程序 我经历了tutorial https firebase google com docs android setup了解如何设置 Android Studio 以与 Firebase
  • 在第 n 次出现后删除字符串的其余部分

    我有以下字符串 a this is a string 我希望删除第三个 之后的所有内容符号 以便它返回 trim a gt gt gt this is a 而没有第三个 的字符串应该返回自身 这个答案 如何删除python中特定字符之后的所
  • 将 XAML 转换为 FlowDocument 以在 WPF 中的 RichTextBox 中显示

    我有一些 HTML 我正在使用 Microsoft 提供的库将其转换为 XAML string t HtmlToXamlConverter ConvertHtmlToXaml mail HtmlDataString true 现在 从如何将