I have an Image inside a Canvas:
<Canvas>
<Image HorizontalAlignment="Center" VerticalAlignment="Center" />
</Canvas>
And I want to display the Image always (even after a possible resizing) in the center of my Canvas, but in this way the image is draw in the Top-Left corner. How can I do?
The coolest thing of this aproach taht it would work if you change sizes of both image and canvas.
Converter code:
XAML, somewhere in resources:
XAML: