PDA

View Full Version : How to change level of objects in Silverlight 2



vladc77
August 8th, 2008, 04:46 AM
I am wondering if anyone might help me to find out on how I can change the level of the button on click/rollover. I have a set of buttons on stage and I scale each button on rollover. I need to make the active button to be on highest level because buttons on scale overlap each other. As a result, an enlarged button goes under the button which is on a higher layer. It doesn't look good. I also am wondering if it is the same technique to change levels with storyboards.

Any advice is highly appreciated.
Thanks.

kirupa
August 9th, 2008, 03:05 AM
Hi vlad! Try altering the button's ZIndex via something like Canvas.SetZIndex(buttonName, 10); where buttonName is the name of your button and 10 is a number I picked for the z-index.