You can do so by binding the child’s Height to the Canvas’s ActualHeight, as follows:
[XAML]
<Canvas Name='myCanvas'>
<Grid Canvas.Left='10' Width='20' Height='{Binding ElementName=myCanvas, Path=ActualHeight}' >
</Grid>
</Canvas>
You can do so by binding the child’s Height to the Canvas’s ActualHeight, as follows:
[XAML]
<Canvas Name='myCanvas'>
<Grid Canvas.Left='10' Width='20' Height='{Binding ElementName=myCanvas, Path=ActualHeight}' >
</Grid>
</Canvas>
Share with