示例#1
0
 private void OnHorizontalScrollOutOfBound(object sender, Components.ScrollOutOfBoundEventArgs e)
 {
     if (e.PanDirection == Components.ScrollOutOfBoundEventArgs.Direction.Left)
     {
         horizontalItems[0].Text = "Reached at the left.";
     }
     else if (e.PanDirection == Components.ScrollOutOfBoundEventArgs.Direction.Right)
     {
         horizontalItems[4].Text = "Reached at the right.";
     }
 }
 private void OnScrollOutOfBound(object sender, Components.ScrollOutOfBoundEventArgs e)
 {
     if (e.ScrollableBound == Components.ScrollOutOfBoundEventArgs.Bound.Top)
     {
         items[0].Text = "Reached at the top.";
     }
     else
     {
         items[4].Text = "Reached at the bottom.";
     }
 }
示例#3
0
 private void OnVerticalScrollOutOfBound(object sender, Components.ScrollOutOfBoundEventArgs e)
 {
     if (e.Displacement > 100)
     {
         if (e.PanDirection == Components.ScrollOutOfBoundEventArgs.Direction.Down)
         {
             verticalItems[0].Text = $"Reached at the top, panned displacement is {e.Displacement}.";
         }
     }
     else if (0 - e.Displacement > 100)
     {
         if (e.PanDirection == Components.ScrollOutOfBoundEventArgs.Direction.Up)
         {
             verticalItems[4].Text = $"Reached at the bottom, panned displacement is {e.Displacement}.";
         }
     }
 }