Skip to content

Instantly share code, notes, and snippets.

@40
Created July 25, 2012 21:54
Show Gist options
  • Select an option

  • Save 40/3178918 to your computer and use it in GitHub Desktop.

Select an option

Save 40/3178918 to your computer and use it in GitHub Desktop.
Swipe Gesture Between Page in BB10 Cascades (code)
Page {
content: Container {
SegmentedControl {
Option { id: option1; text: "Container1"; value: "option1"; selected: true }
Option { id: option2; text: "Container2"; value: "option2" }
onSelectedIndexChanged: {
if (selectedIndex == 0) {
cnt2.visible = false;
cnt1.visible = true;
}
else if (selectedIndex == 1) {
cnt1.visible = false;
cnt2.visible = true;
}
}
} // SegmentedControl
Container {
id: cnt1
}
Container {
id: cnt2
}
} // Container
} // Page
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment