How to center an element in wpf canvas
I came across this post, because I was searching for a way to center an element within a Canvas in XAML only, instead of using Attached Properties. Just in case, you came for the same reason: <Canvas x:Name=”myCanvas”> <Grid Width=”{Binding ActualWidth, ElementName=myCanvas}” Height=”{Binding ActualHeight, ElementName=myCanvas}”> <Label Content=”Hello World!” HorizontalAlignment=”Center” VerticalAlignment=”Center” /> </Grid> </Canvas> One more … Read more