如何控制 FlowDocument 缩放控件的高度
在下文中,缩放控件最终与 Expander 控件中设置的 FontSize 成比例:
<ScrollViewer>
<StackPanel>
<Expander MaxHeight="500" Margin="5" Padding="5" FontSize="40pt" Header="Test Header">
<FlowDocumentReader ViewingMode="Scroll" >
<FlowDocument Foreground="Black" FontSize="18pt">
<List>
<ListItem>
<Paragraph>Test</Paragraph>
</ListItem>
</List>
</FlowDocument>
</FlowDocumentReader>
</Expander>
</StackPanel>
</ScrollViewer>
我希望能够独立于 Expander 控件中的设置来控制缩放控件的高度。
关于我如何做到这一点有什么想法吗?
In the following, the zoom controls end up being proportional to the FontSize set in the Expander control:
<ScrollViewer>
<StackPanel>
<Expander MaxHeight="500" Margin="5" Padding="5" FontSize="40pt" Header="Test Header">
<FlowDocumentReader ViewingMode="Scroll" >
<FlowDocument Foreground="Black" FontSize="18pt">
<List>
<ListItem>
<Paragraph>Test</Paragraph>
</ListItem>
</List>
</FlowDocument>
</FlowDocumentReader>
</Expander>
</StackPanel>
</ScrollViewer>
I would like to be able to control the height of the zoom controls independent of settings in the Expander control.
Any ideas on how I can do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
想出了一种方法来做到这一点。 设置 FlowDocumentReader 的 FontSize。 那么缩放按钮的大小将取决于 FlowDocumentReader 中的 FontSize。
可能不是理想的方法,但它确实有效。
Figured out one way to do it. Set the FontSize of the FlowDocumentReader. Then the size of the zoom buttons will depend on the FontSize in the FlowDocumentReader.
Probably not the ideal way to do it, but it works.