Bring to front in SilverlightWP7MultiTouchSample

Feb 6, 2011 at 2:06 AM

Hello,

I have tired SilverlightWP7MultiTouchSample, it works fine, but i can't figure out how the following thing is implemented: when you touch an image  it is automatically became the top image (and cover other images). I thought that this thing could be implemented with zindex but have not found any manipulation with Zindex. How did you do this?

Feb 6, 2011 at 11:49 AM

Hi becoolmax,

yes, it uses ZIndex. Check out the method "BringToFront()" available in "MultiTouchManipulationBehavior.cs".

Thanks,

Davide

Feb 6, 2011 at 7:46 PM

thanks davidezordan,

what i found is that BringToFront works only when  i add a control inside canvas, if i add an image directly to ContentPanel then multiotuch features works fine but bring to front feature does not work.

I have another question, in version 0.5 it was possible to move control without any limitation, but in the current version the translation is limited, so i'm not able to push control behind an edge. Here is an example: http://www.flickr.com/photos/57819872@N03/5422076543/ i cant push control more to the left side, so how can get the behavior like it use to be?

Feb 6, 2011 at 8:33 PM

Thanks for the feedback, I have updated the BringToFront() method in order to use a generic Panel instead of a Canvas, now it should work.

In the current version it's enabled a constraint to the parent element for translation. It's planned for next releases the introduction of a Dependency Property in order to permit the activation / deactivation of this feature.

Thanks,

Davide