Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable navigation on FlipView

I would like to disable all navigation on my FlipView (scrolling horizontally) from user's input (e.g. mouse wheel and touch screen).

The only way the flipview is supposed to change its selected index is programatically, I have already removed the side buttons in the FlipView's style.

I tried changing some of the ScrollViewer's properties in its style but I can't manage to block everything. Anybody can hint me the correct and clean way to do this?

like image 328
Max Avatar asked Feb 24 '14 14:02

Max


2 Answers

I found the solution by overriding the ControlTemplate and changing ManipulationMode in ItemsPresenter. Just place this code inside your FlipView:

<FlipView.Template>
    <ControlTemplate>
        <ItemsPresenter ManipulationMode="None"></ItemsPresenter>
    </ControlTemplate>
</FlipView.Template>

In my opinion it shouldn't be that difficult to do something simple like disabling user interaction. There should be a property to do that.

like image 62
Vojtech Robotka Avatar answered Oct 16 '22 02:10

Vojtech Robotka


You can set IsEnabled property of the FlipView to False.

Hope this help!

like image 31
Lion Pham Avatar answered Oct 16 '22 01:10

Lion Pham