This project is read-only.
2

Resolved

Investigate stretching behavior

description

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"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ve="clr-namespace:InfoStrat.VE;assembly=InfoStrat.VE"
Title="Window1" Height="300" Width="400">
<Grid>
    <ve:VEMap HorizontalAlignment="Stretch" Width="400"/>
</Grid>
</Window>
 
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.

comments

DanielKornev wrote Apr 7, 2009 at 10: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 7: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 7: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 10:47 PM

wrote Feb 14, 2013 at 4:02 AM

wrote May 16, 2013 at 9:27 AM

wrote May 16, 2013 at 9:27 AM

wrote Jun 14, 2013 at 8:08 AM