Exemplo n.º 1
0
 public Driver(FastVerticallyScrollingItemViewer parent, IComparer <T> comparer)
 {
     this._parent     = parent;
     this._layoutTree = new PersistentAggregatingRedBlackTree <Unique <T>, ControlData, double>(
         (a1, k, v, a2) => a1 + v.Value.Type.Height + a2,
         Unique <T> .MakeComparerUnique(comparer));
     parent.scrollView.ViewChanged += (sender, arg) => UpdateShown();
     parent.scrollView.SizeChanged += (sender, arg) => {
         parent.layoutArea.Width = arg.NewSize.Width; // Warning: removing this may result in search results that drift right/left as they are manipulated by touch
         UpdateShown();
     };
 }