Hi,
I have a grid where one columnwidth is defined as *.
The other columns are defined as Auto.
The column with the *-definition contains a usercontrol derived from Panel that also implements IScrollInfo.
During this control's MeasureOverride visibility is set to visible on a RepeatButton in another column (the RepeatButton's visibility is otherwise set to collapsed).
This does not cause the column to expand. This will only occur when I resize my window. A simplified example:
<DockPanel LastChildFill="True">
<Grid DockPanel.Dock="Left">
<Grid.ColumnDefinitions>
<ColumnDefinition x:Name="TabItemColumn"/>
<ColumnDefinition x:Name="ScrollRightColumn" Width="Auto"/>
</Grid.ColumnDefinitions>
<ScrollViewer x:Name="PART_ScrollViewer"
Grid.Column="0"
Margin="-1,0,0,0"
Height="32"
CanContentScroll="True"
VerticalScrollBarVisibility="Hidden"
HorizontalScrollBarVisibility="Hidden"
HorizontalAlignment="Left">
<local:TabPanel
x:Name="tabPanel"
HorizontalAlignment="Left"
IsItemsHost="True" />
</ScrollViewer>
<RepeatButton Style="{StaticResource RepeatButtonScrollRight}"
Visibility="{Binding ElementName=tabPanel, Path=CanScrollRight, Converter={StaticResource _localBooleanConverter}}"
Grid.Column="1">
</RepeatButton>
The visibility of the RepeatButton is triggered correctly, and as far as I can tell it is actually rendered, but the ActualWidth of the containing column is zero until resize.
Any ideas?