windows runtime - What's visible in a ScrollViewer? -
I have a In your case, you can use the It does a somewhat intense visual tree search, but it can be fine for your scenario if your GridView . I'm using nested
ScorpViewer of
SnapPoints to see each record because it is only a visible change, and there is no data change, how can I determine it Which record (current) are visible to me? Something like
SelectedItem , but a visual query. I can check every record, but it seems disqualified. idea?
VisualTreeHelperExtensions And do something like
gridView .GetDescendantsOfType & lt; GridViewItem & gt; (). Select (gvi = & gt; gridView.ItemFromContainer (gvi));
GridView uses virtualization because the item returns Have gone or are near view ports. If you want to be more precise then you can test to force reset intersections. Something can be sufficient:
Fixed class rectExtensions {public static bool ContentsPartOf (This RET Bearerctact, Ricet Shortcut) {// It is a very small scrollable horizontally Targeted testing is. Return bigRect.Left & lt; Small diagonals Late End; BigRect.Right & gt; SmallRect.Left || BigRect.Left & lt; Small diagonals Write & amp; BigRect.Right & gt; SmallRect.Right; }} Var sv = gridView.GetFirstDescendantOfType & lt; ScrollViewer & gt; (); Var bigRect = New Rect (0, 0, sv.ActualWidth, sv.ActualHyight); Gridview .GetDescendantsOfType & lt; GridViewItem & gt; (). Where (live = & gt; bredected contents PARTOf (gvi.GetBoundingRect (sv)). Select (GV = & gt; GridviewEtemform CONTAINER (GVI));
Comments
Post a Comment