开发者

How to bring on ScatterViewItem in a collection of ScatterViewItem to the foreground?

I have a lot of ScatterViewItems that I programatically add to a ScatterView. Now I have also a DropDown li开发者_C百科st. Every time I choose an item in the DropDown list, I'd like to change the background of the corresponding ScatterViewItem, and if multiple ScatterViewItems are overlapping, I'd like to bring the corresponding ScatterViewItem in the foreground.

Changing the background color is no problem. But how can I bring a ScatterViewItem to the Foreground? I already tried to remove it from the ItemCollection of the ScatterView and then adding it again, so that it is the latest added ScatterViewItem. This works, but isn't there a better way?


IsActive property on the ScatterviewItem will do this job for you


Don't confuse "activation" for zorder. Activation of an SVI will change it's zorder but it also does other things (like trigger animations). If all you want to do is change the zorder of an item, use this API: http://msdn.microsoft.com/en-us/library/microsoft.surface.presentation.controls.scatterviewitem.setrelativezindex(v=Surface.10).aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜