c# - What WP 8.1 XAML control could look and behave like the system Task switcher? -
i'm writing windows phone 8.1 store app , need create control looks , behaves similar wp 8.1 system task switcher (that appears when holding hardware button).
it should show images , support sliding left or right when swiping. know control should use or need create new control scratch?
so, sollution easy. control looking was... scrollviewer. has 2 properties in winrt xaml make scrollviewer scrolling behave wanted: horizontalsnappointsalignment
, horizontalsnappointstype
.
if want try behavior, this msdn code sample expose you.
one point mention. if wish set such behavior to, example, listview should firstly internal scrollviewer in code , set horizontalsnappointsalignment
, horizontalsnappointstype
properties. can use getfirstdescendantoftype<t>()
extension method winrt xaml toolkit.
var sv = mylistview.getfirstdescendantoftype<scrollviewer>(); sv.horizontalsnappointsalignment = snappointsalignment.center; sv.horizontalsnappointstype = snappointstype.mandatory;
Comments
Post a Comment