In this example code, I'm trying to offset the Grid
's Canvas
position by the height of one of its rows. Does anyone see what I might be doing wrong? As you can see, I tried moving the binding lower in the xaml file, just in case the RowDefinitions
needed to be defined first. Either way, it doesn't seem to matter because Canvas.Top
is always 0.
<Canvas>
<Grid Canvas.Top="{Binding ElementName=DetailsRow, Path=ActualHeight}">
<Grid.RowDefinitions>
<RowDefinition x:Name="NameRow" />
<RowDefinition x:Name="DetailsRow" />
</Grid.RowDefinitions>
<Button Grid.Row="0">Button</Button>
<Button Grid.Row="1">Button</Button>
<!-- I expected this to maybe work, but no dice
<Canvas.Top>
<Binding ElementName="DetailsRow" Path="ActualHeight" />
</Canvas.Top>
-->
</Grid>
</Canvas>