Investigate stretching behavior


I just tested it again and I don't get a crash with the scenario I described, but the control doesn't fill up it's parent grid like I expect. Here's the source:
<Window x:Class="VESizeTest.Window1"
Title="Window1" Height="300" Width="400">
    <ve:VEMap HorizontalAlignment="Stretch" Width="400"/>
You can see the white background of the window on the sides of the map when you'd expect the map to fill the entire window. I also noticed that if I set the height to 300 then the map does fill the entire window.


DanielKornev wrote Apr 7, 2009 at 9:13 AM

It seems to be limited by way the control was designed. It's actually a window wrapped in the control

DanielKornev wrote Apr 8, 2009 at 6:03 AM

UPDATED: download control sources, go to VEWindow.xaml and change dimensions of WinFormsHost from 1024x768 to other which is ok for your display. For my display it is 1280x800 for yours it can be different. Also change it in themes\ folder, too.

To InfoStrat: consider making an XML file with settings in which the correct Display Aspect Ratio would be changeable by end developers or detect and change it automatically for different displays.

JoshB wrote Apr 17, 2009 at 6:27 PM

The reason the WinFormsHost was smaller than the window was due to performance reasons. I found that on some hardware, the fps was bottlenecked by the directx buffer copying code, which is basically a memory bandwidth issue. A smaller buffer size increases performance.

I'm still planning to address the scaling issue and maybe make the aspect ratio configurable.

wrote Jan 30, 2010 at 9:47 PM

wrote Feb 14, 2013 at 3:02 AM

wrote May 16, 2013 at 8:27 AM

wrote May 16, 2013 at 8:27 AM

wrote Jun 14, 2013 at 7:08 AM