I'm trying to position two Image elements inside a Canvas, yet it doesn't seem to work as expected.
<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Grid>
<StackPanel>
<Canvas>
<Image Source="testImage.png" Height="240"/>
<Image Source="championPortaitHolder.png" Height="240" />
</Canvas>
<TextBlock>This is some random text.</TextBlock>
</StackPanel>
</Grid>
</Window>
It seems I can't put the Top
property on the Images, what can I do position the images exactly how I want it to appear.
Also, the Canvas element doesn't seem to occupy all it's space. It's as if the element was "floated" in HTML terms.
Any ideas on that as well?