Home > Back-end >  Xaml make element through two columns
Xaml make element through two columns

Time:08-30

I have simple grid

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

On the last row I have TextBlock but I need that text block to take two columns. Problem is that if it take just first column it stretch other three elements to right which I dont want.

Is this achievable? If yes how?

CodePudding user response:

I think you are looking for a columnspann

https://docs.microsoft.com/en-us/dotnet/api/system.windows.controls.grid.columnspan?view=windowsdesktop-6.0

  • Related