Silverlight Tips provides simple and useful tutorials and tips with real life examples, live demos and sample codes to download.
About authors:
Damon Serji
Damon Serji,
Silverlight developer working at Metia in London.
Gavin Wignall
Gavin Wignall,
Interactive Design Lead, working in design for over 10 years, the last 3 being in Silverlight.
Allan Muller
Allan Muller,
Developer, working on various types of Silverlight and WCF projects.
Recent comments

To set the ZIndex of a Silverlight control programmatically use:

Canvas.SetZIndex(_control, zIndex);

Where _control is your Silverlight control and _zIndex is an integer number which you would like the new ZIndex of your control to be assigned to.

Posted by Damon Serji on 12. September 2009 16:55 under: Basic
 with 2 Comments

Comments

Jason:

Does this work with only Canvases or any controls?

Posted 9/12/2009 8:33:42 AM

Damon:

Hi Jason,

This method works with any Silverlight object, Canvas.SetZIndex() is a built-in Silverlight method (part of System.Windows.Controls namespace). Please let me know if you are experiencing any problems using this method and I will try to help.

Posted 9/14/2009 11:05:30 AM

Add comment


(Will show your Gravatar icon)

biuquote
  • Comment
  • Preview