I have the following code:
<Window x:Class="UnderstandSizing.Window2"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window2" Height="300" Width="300">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" x:Name="Column1" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBox Grid.Column="0" Text="{Binding ActualWidth,ElementName=Column1,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}" />
</Grid>
</Window>
I expected to see at the textbox the value of the width of the column Column1 but all I can see is 0.
I've seen this and this but everywhere says that is related only to Silverlight, not WPF.
Edit Fixed a typo. Also to note that the Output window do not show any binding issue . What is strange to me is that it is working in the designer. It stops working only on runtime.