Advertisement
dkonigsberg

Cascades optional scroll

Mar 16th, 2013
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ScrollView {
  2.     id: scrollView
  3.     horizontalAlignment: HorizontalAlignment.Fill
  4.     verticalAlignment: VerticalAlignment.Fill
  5.     scrollViewProperties {
  6.         scrollMode: ScrollMode.Vertical
  7.         overScrollEffectMode: {
  8.             if(scrollViewLayout.layoutFrame.height < containerLayout.layoutFrame.height) {
  9.                 OverScrollEffectMode.Default
  10.             } else {
  11.                 OverScrollEffectMode.None
  12.             }
  13.         }
  14.     }
  15.     Container {
  16.         id: container
  17.         layout: StackLayout {
  18.             orientation: LayoutOrientation.TopToBottom
  19.         }
  20.  
  21.         // Controls go here
  22.  
  23.         attachedObjects: [
  24.             LayoutUpdateHandler {
  25.                 id: containerLayout
  26.             }
  27.         ]
  28.     }
  29.     attachedObjects: [
  30.         LayoutUpdateHandler {
  31.             id: scrollViewLayout
  32.         }
  33.     ]
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement