locked
How Stretch the button(s) to fit in the cell ? RRS feed

  • Question

  • <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
    
    </Grid.ColumnDefinitions>
    <Grid.RowDefinitions>
        <RowDefinition />
        <RowDefinition />
    
    </Grid.RowDefinitions>
    
    <StackPanel Grid.Row="1"  Grid.Column="1"      Background="CadetBlue" >
        <Button Name="Ali1" Content="ali0001" VerticalAlignment="Stretch" />
        <Button Name="Ali2" Content="Ali0002" HorizontalAlignment="Stretch" />
     </StackPanel>
    Friday, May 15, 2020 7:42 AM

All replies

  • Hi Vadim Ivanof,
    Based on your code, it is mostly related to WPF. So it is recommended to ask the questions in Microsoft Q&A forum and you can get more professional answer.
    Thank you for your understanding.
    Best Regards,
    Daniel Zhang


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, May 15, 2020 8:54 AM