-
-
Try Width="Auto"
-
Thanks, it worked. But omfg, WPF sucks big time so far. Totally unnatural/unlogical compared to what "we are used to" from winforms.jh71283 said:Try Width="Auto" -
FWIW, if you don't specify a width at all (and no other positioning/sizing properties besides the height and vertical alignment at the bottom), WPF will make the status bar automatically resize like you'd expect it to. This is the XAML generated by Blend for a window only containing a status bar, and it resizes as expected:turrican said:
Thanks, it worked. But omfg, WPF sucks big time so far. Totally unnatural/unlogical compared to what "we are used to" from winforms.jh71283 said:*snip*
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="TestStatusbar.Window1"
x:Name="Window"
Title="Window1"
Width="640" Height="480">
<Grid x:Name="LayoutRoot">
<StatusBar VerticalAlignment="Bottom" Height="26" Background="#FF5F7CAD"/>
</Grid>
</Window>
-
CannotResolveSymbol,CannotResolveSymbol said:
FWIW, if you don't specify a width at all (and no other positioning/sizing properties besides the height and vertical alignment at the bottom), WPF will make the status bar automatically resize like you'd expect it to. This is the XAML generated by Blend for a window only containing a status bar, and it resizes as expected:turrican said:*snip*
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="TestStatusbar.Window1"
x:Name="Window"
Title="Window1"
Width="640" Height="480">
<Grid x:Name="LayoutRoot">
<StatusBar VerticalAlignment="Bottom" Height="26" Background="#FF5F7CAD"/>
</Grid>
</Window>
wouldn't it make sense to use a DockPanel instead of a Grid
-
Probably, but I was just seeing what Blend spat out when I tried to make a status bar, so I didn't bother to put it in a DockPanel (Blend projects start out with a Grid in the document).brian.shapiro said:
CannotResolveSymbol,CannotResolveSymbol said:*snip*
wouldn't it make sense to use a DockPanel instead of a Grid


Thread Closed
This thread is kinda stale and has been closed but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.