积极答复者
WPF中RichTextBox问题

问题
答案
-
你好,
据我所知,是没有可以使得Figure的这两个属性可以工作的其他办法,如果你需要在RichTextBox中实现类似功能,可以使用Floater,利用其 Margin 属性调整位置:
<RichTextBox> <FlowDocument > <Paragraph> <Floater Background="Red" Width="140" HorizontalAlignment="Left" Margin="150,50,Auto,Auto"> <Paragraph> sssssssssssssss </Paragraph> </Floater> </Paragraph> </FlowDocument> </RichTextBox>
截图:
参考引用:
#Floater Class
http://msdn.microsoft.com/en-us/library/system.windows.documents.floater(v=vs.110).aspxWe are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- 已标记为答案 MakubeXSoft 2014年3月12日 14:43
全部回复
-
你好,
在RichTextBox内的FlowDocument中,这两个属性是无效的,如果你使用FlowDocumentReader, 它们将会正常工作:
<FlowDocumentReader> <FlowDocument > <Paragraph> <Figure Background="Aqua" Name="myFigure" Width="140" Height="50" HorizontalAnchor="PageCenter" VerticalAnchor="PageCenter" HorizontalOffset="100" VerticalOffset="20" WrapDirection="Both"> <Paragraph> sssssssssssssss </Paragraph> </Figure> </Paragraph> </FlowDocument> </FlowDocumentReader>
截图:
回答者建议使用 FixedDocument 或者 Annotations, 你可以尝试下
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey. -
你好,
据我所知,是没有可以使得Figure的这两个属性可以工作的其他办法,如果你需要在RichTextBox中实现类似功能,可以使用Floater,利用其 Margin 属性调整位置:
<RichTextBox> <FlowDocument > <Paragraph> <Floater Background="Red" Width="140" HorizontalAlignment="Left" Margin="150,50,Auto,Auto"> <Paragraph> sssssssssssssss </Paragraph> </Floater> </Paragraph> </FlowDocument> </RichTextBox>
截图:
参考引用:
#Floater Class
http://msdn.microsoft.com/en-us/library/system.windows.documents.floater(v=vs.110).aspxWe are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- 已标记为答案 MakubeXSoft 2014年3月12日 14:43