Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Changing Virtualization on the fly

$
0
0
Is there a way to change virtualization on the fly and force the IItemContainerGenerator (I believe this is what it's called) to regenerate?  I've got a DataGrid which by default is using virtualization so when I try to use the PrintDialog's PrintVisual() method the records currently displayed on the screen a a couple more after it are printed.  So far the only thing I've been able to come up with (which works) is to check the control passed in to see if it's ScrollViewer's CanContentScroll property is set to true.  If so then set it to false which disables Virtualization but only after I call the control's UpdateLayout().  I'm not sure that this is ideal.  Any suggestions on a better way to accomplish this that I'm missing?

Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>