我正在使用一些包含InlineUIContainer
元素的RichTextBlock
對象。我希望能夠選擇並複製所有文本,包括InlineUIContainer
中包含的文本。使用InlineUIContainers複製Xaml RichTextBlock文本
當前,當我選擇塊中的所有文本時,將跳過InlineUIContainer
對象中包含的文本。
這裏是我創建的內容的一個例子:
<RichTextBlock IsTextSelectionEnabled="True">
<Paragraph FontSize="20">
<Bold>This text is selectable</Bold>
<InlineUIContainer FontFamily="Global User Interface">
<StackPanel Orientation="Horizontal">
<TextBlock FontSize="11" VerticalAlignment="Top" Margin="0,0,-1,0">Super Script Text</TextBlock>
<HyperlinkButton ClickMode="Release" Style="{StaticResource NoMarginHyperlinkButtonStyle}">
Link
</HyperlinkButton>
</StackPanel>
</InlineUIContainer>
This text is also selectable
</Paragraph>
</RichTextBlock>
如果我從這塊的XAML選擇所有文本的複製/粘貼到記事本中,我沒有得到超級腳本文字或鏈接文字。
有沒有什麼辦法可以讓所有的文本被選中?
你檢查[這]利潤率等(http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/a74e765d-f8ed-45cc-a0e8-77800f59a001 /),我知道它與WPF有關。 – Xyroid 2013-04-07 05:40:03
感謝您的鏈接,我會檢查出來,讓你知道如果這個作品 – 2013-04-08 14:06:57