I have the following mark-up in a view. When I get WindowContainer.Width
during start-up code for the view, it returns NaN
.
<Border BorderThickness="10">
<StackPanel x:Name="Panel" Orientation="Vertical" >
<Grid x:Name="WindowContainer" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Loaded="WindowContainer_OnLoaded">
<delphi:Win32WindowHost x:Name="Host" />
</Grid>
<TextBlock x:Name="InfoTextBlock" HorizontalAlignment="Right" />
</StackPanel>
</Border>
Does Stretch
make the grid stretch to accomodate all its content, or to fill its container? I want it to stretch to fill the container, the Border
, and have a proper double
width I can use to size a floating window to be the same size.