Reputation:
How do I get the topmost ScatterViewItem in a ScatterView?
Upvotes: 1
Views: 737
Reputation: 29073
You need something like this:
scatterView.Items.OrderBy( s => Canvas.GetZIndex(s) ).First()
Upvotes: 1
Reputation: 50038
You can go through each of the ScatterViewitem and keep check of which ScatterViewItem.IsActive is set. that will be the topmost at that moment
For of the times it will be a loop on ScatterView.Items to iterate on ScatterViewItems
Upvotes: 0