Of course you can, InlineUIContainer is the one that can accept controls such as button in the RichTextBlock, Take a look at the content model section in RichTextBox Overview.
InlineUIContainer inline = new InlineUIContainer();
inline.Child = new Button();
Paragraph block = new Paragraph();
block.Inlines.Add(inline);
rtb.Blocks.Add(block);
--James
<THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
Thanks
MSDN Community Support
Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.
No comments:
Post a Comment