vITs
vITs

Reputation: 1560

Two images overlapping case in windows phone

Consider I have a grid in that I place two images A and B. Both are visible all the times as margins are set like that. Here as A is drawn first so B is completely Visible overlapping A partially and hence A is Partially visible. Here my Question comes : I want to alternate this behavior runtime that is , A is completely Visible and B is partially. As I can not redraw B first then A for this to happen. Do we have any property or something like Depth in windows phone?

Upvotes: 0

Views: 46

Answers (1)

Igor Ralic
Igor Ralic

Reputation: 15006

You can set Canvas ZIndex (or Panel ZIndex)

Read more about Canvas.ZIndex here on MSDN.

If you want to set it in code behind, you can do this:

someImage.SetValue(Canvas.ZIndexProperty, 1); 
someOtherImage.SetValue(Canvas.ZIndexProperty, 2); 

Upvotes: 1

Related Questions