Note that there are some explanatory texts on larger screens.

plurals
  1. POWPF Grid SharedSizeGroup error
    text
    copied!<p>If you run this code and click on tab 2 and then back on tab 1 the application goes insane and starts bouncing the column widths back and forth. Any suggestions on how to fix this?</p> <pre><code>&lt;Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525"&gt; &lt;Grid IsSharedSizeScope="True"&gt; &lt;Grid.RowDefinitions&gt; &lt;RowDefinition Height="Auto" /&gt; &lt;RowDefinition Height="Auto" /&gt; &lt;/Grid.RowDefinitions&gt; &lt;Grid.ColumnDefinitions&gt; &lt;ColumnDefinition Width="Auto" /&gt; &lt;ColumnDefinition Width="*" /&gt; &lt;ColumnDefinition Width="Auto" SharedSizeGroup="Col3" /&gt; &lt;ColumnDefinition Width="*" /&gt; &lt;/Grid.ColumnDefinitions&gt; &lt;TextBlock Text="Label 1" Grid.Row="0" Grid.Column="0" /&gt; &lt;TextBox Grid.Column="1" Grid.Row="0" Text="TextBox 1" /&gt; &lt;TextBlock Text="Label 2" Grid.Row="0" Grid.Column="2" /&gt; &lt;TextBox Grid.Column="3" Grid.Row="0" Text="TextBox 2" /&gt; &lt;DockPanel Grid.Row="1" Grid.Column="2" Grid.ColumnSpan="2"&gt; &lt;TabControl&gt; &lt;TabItem Header="Tab 1"&gt; &lt;Grid&gt; &lt;Grid.ColumnDefinitions&gt; &lt;ColumnDefinition SharedSizeGroup="Col3" /&gt; &lt;ColumnDefinition Width="Auto" /&gt; &lt;/Grid.ColumnDefinitions&gt; &lt;Grid.RowDefinitions&gt; &lt;RowDefinition Height="Auto" /&gt; &lt;RowDefinition Height="Auto" /&gt; &lt;/Grid.RowDefinitions&gt; &lt;TextBlock Text="Tab 1: Short Text.." Grid.Row="0" Grid.Column="0" /&gt; &lt;/Grid&gt; &lt;/TabItem&gt; &lt;TabItem Header="Tab 2"&gt; &lt;Grid&gt; &lt;Grid.ColumnDefinitions&gt; &lt;ColumnDefinition SharedSizeGroup="Col3" /&gt; &lt;ColumnDefinition Width="Auto" /&gt; &lt;/Grid.ColumnDefinitions&gt; &lt;Grid.RowDefinitions&gt; &lt;RowDefinition Height="Auto" /&gt; &lt;RowDefinition Height="Auto" /&gt; &lt;/Grid.RowDefinitions&gt; &lt;TextBlock Text="Tab 2: Short Text.." Grid.Row="0" Grid.Column="0" /&gt; &lt;TextBlock Text="Tab 2: Long Text..................................... " Grid.Row="1" Grid.Column="0" /&gt; &lt;/Grid&gt; &lt;/TabItem&gt; &lt;/TabControl&gt; &lt;/DockPanel&gt; &lt;/Grid&gt; &lt;/Window&gt; </code></pre> <p>This is stripped from a similar application and greatly simplified. The root of the problem is the SharedSizeGroup "Col3". In the actual application there are other items that share that column so I cannot remove SharedSizeGroup unless there is another way to accomplish the desired behavior.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload