I have a couple of listboxes on a WPF Windows, with Height="Auto" Width="Auto"
set on the form
The form sizes perfectly on different resolutions, but the problem is that when I press the maximise button a thick "Black L" is visible while the form resizes. I have seen this on quite a few WPF applications, but not had to solve the problem till now.
Is there a way to DoubleBuffer the Window, or call SuspendLayout() in WPF while the controls on the form are resized? How can I get rid of this ugly black L?
Vault, I think this may have something to do with UI virtualization that listboxes perform. Virtualization allows the listbox to load only those UI elements which are being rendered. The listbox does with the help of VirtualizingStackPanel as its ItemsPanelTemplate.
So my guess seems to be... that maximising the window would have pushed the listboxes to generate more UI elements and the delay would have casued the black 'L'.
You can remove virtualization and check it whether the black 'L' still appears. By the way, virtualization is in fact a "good" thing, and turning it off is a generally a bad idea.
Quoting one of the recent Hanselminutes:
It seems relevant to your problem, though I'm not aware of a complete solution. Maybe, you should try to change some Dispatcher priorities?