anon
anon

Reputation:

How to get topmost ScatterViewItem in a ScatterView?

How do I get the topmost ScatterViewItem in a ScatterView?

Upvotes: 1

Views: 737

Answers (2)

Robert Levy
Robert Levy

Reputation: 29073

You need something like this:

scatterView.Items.OrderBy( s => Canvas.GetZIndex(s) ).First()

Upvotes: 1

Jobi Joy
Jobi Joy

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

Related Questions