コード例 #1
0
ファイル: DSGridView.cs プロジェクト: onurhazar/dscomponents
 /// <summary>
 /// Handles the on did scroll.
 /// </summary>
 /// <param name="sender">Sender.</param>
 /// <param name="offSet">Off set.</param>
 internal void HandleOnDidScroll(object sender, DSPoint offSet)
 {
     if (mHeaderView != null)
     {
         var hWidth = Processor.CalculateSize().Width;
         mHeaderView.LayoutParameters = new DSAbsoluteLayout.DSAbsoluteLayoutParams(Context.ToDevicePixels((int)hWidth), Context.ToDevicePixels((int)this.Theme.HeaderHeight), -(int)offSet.X, 0);
     }
 }
コード例 #2
0
        /// <Docs>Current horizontal scroll origin.</Docs>
        /// <param name="oldl">Previous horizontal scroll origin.</param>
        /// <summary>
        /// This is called in response to an internal scroll in this view (i.e., the
        ///  view scrolled its own contents).
        /// </summary>
        /// <param name="l">L.</param>
        /// <param name="t">T.</param>
        /// <param name="oldt">Oldt.</param>
        protected override void OnScrollChanged(int l, int t, int oldl, int oldt)
        {
            if (t != oldt)
            {
                //this.RequestLayout ();
                //hasDrawn = false;
            }

            var dsPoint = new DSPoint(l, t);

            OnDidScroll(this, dsPoint);

            base.OnScrollChanged(l, t, oldl, oldt);
        }