S
S
sergeyfk2017-11-22 11:09:02
WPF
sergeyfk, 2017-11-22 11:09:02

How to force Grid to take up all available space in StatusBar?

<StatusBar Grid.Row="3">

            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="auto"/>
                    <ColumnDefinition/>
                    <ColumnDefinition Width="auto"/>
                </Grid.ColumnDefinitions>

                <TextBlock Text="Ничего не выполняется" FontSize="12" Grid.Column="0" VerticalAlignment="Top"/>
                <ProgressBar Grid.Column="1" Margin="5 0 5 0" VerticalAlignment="Center" Height="15"/>
                <TextBlock Text="100%" Grid.Column="2" FontSize="12" Margin="5 0 5 0" VerticalAlignment="Center"/>
            </Grid>                   
            
        </StatusBar>

The status bar itself takes up all the available space, but the grid does not take up all the available space.
I would like the grid to take all the available space, and 0 and 2 columns in it to take the necessary space (clumsily put it, in general, width="auto") and 1 column to take all the free space.
Is it possible to implement this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
d-stream, 2017-11-22
@d-stream

<StatusBar Grid.Row="3" HorisontalAlgiment="Stretch">

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question