【发布时间】:2018-10-14 13:47:50
【问题描述】:
在我的 Richtextbox 中,我有一些文本。文本中间是字符串 [tabe=用户]
如何用我的表格替换(ob Buttonpress)字符串
我创建了一个创建表格的方法
public static Table CreateTable(DataTable dataTable) {
Table table = new Table();
//convert DataTable to Table (with foreach) for RichTextbox //works fine
return table;
}
//insert in the Bottom of the TextBox
RichTextBoxItem.Document.Blocks.Add(CreateTable(myDataTable));
我知道,它可以添加到段落,但它不存在特定段落
谢谢
【问题讨论】:
标签: c# wpf replace datatable richtextbox