- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
使用 DevExpress 时,我看到此错误:
DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled Message="By default, an infinite grid height is not allowed since all grid rows will be rendered and hence the grid will work very slowly. To fix this issue, you should place the grid into a container that will give a finite height to the grid, or you should manually specify the grid's Height or MaxHeight. Note that you can also avoid this exception by setting the GridControl.AllowInfiniteGridSize static property to True, but in that case the grid will run slowly."
最佳答案
问题是 DXGrid
具有无限高。
要修复,请将高度设置为非无限值。
Snoop 对此绝对是无价的:
如果 XAML 元素的“高度”是无限的(即 0
或 NaN
),您可以使用以下一个设置它:
Height="{Binding Path=ActualHeight, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=UIElement}}"
VerticalAlignment="Stretch"
Height="Auto"
提示:使用 VerticalAlignment="Stretch"
如果你是 Grid
的 child 用<RowDefinition Height="*">
, 和 Binding RelativeSource...
如果这不起作用,则在其他地方。
如果父控件的高度是无限的,那么我们的问题就更大了。我们必须继续设置每个连续父级的高度,直到我们用非无限 ActualHeight
击中一个控件。 .
关于c# - DevExpress.Wpf.Grid.InfiniteGridSizeException 未处理,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37431448/
使用 DevExpress 时,我看到此错误: DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled Message="By defa
我是一名优秀的程序员,十分优秀!