DanDan
DanDan

Reputation: 1997

WPF Ribbon not scaling like other controls

I'm havnig some beginner's problem with WPF. I want to scale up my ribbon, so that it spans the entire window width, the other controls are doing just that, just my ribbon doesn't want to. It sits in the upper left corner with a width of maybe 100 pixels. I can scale it up manually by giving it a width, but it doesn't take its width from the grid column like the other controls do. What am I missing?

<Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="100"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="20"/>
        </Grid.RowDefinitions>

        <Custom:Ribbon x:Name="mainRibbon" Grid.Row="0" Grid.Column="0" HorizontalAlignment="Left" Margin="0,0,0,0" VerticalAlignment="Top"/>
        <DockPanel x:Name="mainPanel" Grid.Row="1" LastChildFill="False"/>
        <StatusBar x:Name="mainStatusbar" Grid.Row="2"/>
    </Grid>

Upvotes: 0

Views: 53

Answers (0)

Related Questions