Layers in XAML

Published 7/13/2013 by Christian
Tags: ,

This took me some time to figure out how to do. But as always, as soon as you figure it out, its actually quite simple.

I had two images I, in some cases, wanted to place on top of each other. It turns out, that if you put a given number objects into the same grid cell, they will be placed in layers.

<Grid>
	<Grid Grid.Column="0" Grid.Row="0"> 
		<Image Source="{Binding Path=Image}" />
	</Grid>
	<Grid Grid.Column="0" Grid.Row="0">
		<Image Source="{Binding Path=HoverImage}" />
	</Grid>
</Grid>

As always, feel free to comment, or ask.