我需要创建具有一些隐藏列的Grid快照(通过设置它的ColumnDefinition.Width = 0)。RenderTargetBitmap不尊重ColumnDefinitions宽度
在屏幕上看起来不错,但created image
的所有列都可见(does not respect the ColumnDefinitions)
。我在某处发现了红色,这是因为RenderTargetBitmap正在查看不存在这些更改的不同图层(可视图层与布局图层)。 有没有机会用正确的ColumnDefinitions获得网格的逼真快照?我不能简单地使用Rectagnel.Fill = VisualBrush,因为我需要在循环中存储这些图像(每次迭代=新图像)。
我试着像方式this snippet