wpf ViewBox - 缩放 DataGrid 时,网格线丢失
我有一个 WPF Toolkit DataGrid 控件,包含在 ViewBox 控件内的 Grid 中。 DataGrid 有自己的风格,黑色背景,白色文本和白色网格线。
某些网格线从显示中丢失(字面意思),通常是当 DataGrid 中有 10 行或更多行时。当我删除 ViewBox 时,它工作正常(但我需要缩放,因此需要使用 ViewBox)。
我没有设置视图框的许多属性:
<Viewbox Stretch="Uniform" StretchDirection="Both">
是否需要设置其他属性才能正确缩放 DataGrid?还是因为DataGrid有自己定制的样式?
非常感谢
乔
I have a WPF Toolkit DataGrid control, contained within a Grid, inside a ViewBox control. The DataGrid has its own style with Black background, White Text and White Grid lines.
Some of the grid lines are missing from the grid (literally) from display, typically when there are 10 rows or more in the DataGrid. When I remove the ViewBox, it works fine (but I need scaling hence the use of the ViewBox).
I have not set many properties of the viewbox:
<Viewbox Stretch="Uniform" StretchDirection="Both">
Do I need to set other properties in order for the DataGrid to be scaled properly? Or because the DataGrid has its own customized style?
Thanks very much
Joe
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
增加了 DataGrid 自定义样式中 DataGridCell 的边框大小。
Increased the Border size of the DataGridCells in the DataGrid Customized style.