在WPF的RichTextBox富文本中加入一个可点击的按钮

<RichTextBox>
<local:MyFlowDocument>
<Paragraph>
<InlineUIContainer>
<Button Content="Click Me!" Click="Button_Click"/>
</InlineUIContainer>
</Paragraph>
</local:MyFlowDocument>
</RichTextBox>

 

class MyFlowDocument : FlowDocument
{
protected override bool IsEnabledCore
{
get
{
return true;
}
}
}

posted @ 2024-02-21 10:29  奇迹之耀  阅读(74)  评论(0编辑  收藏  举报