gpt4 book ai didi

c# - WPF 文本 block /直接通过 Inlines.Add() 设置粗体、斜体、下划线标签

转载 作者:太空宇宙 更新时间:2023-11-03 11:22:37 33 4
gpt4 key购买 nike

这里是在 C# 代码中使用 HTML 标记直接粘贴 TextBlock Inlines 的任何解决方案,如下所示:

string example = "Here is <Bold>bold</Bold> text, and here is <Italic>italic</Italic>.";
TextBlock.Inlines.Add(example);

最佳答案

你可以看看this项目

关于c# - WPF 文本 block /直接通过 Inlines.Add() 设置粗体、斜体、下划线标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10447975/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com