Reputation: 56
i am working on winrt flipview. in this i want to disable its default next and prev buttons of FlipView. but the fliping can be done by another buttons. can any one please tell me how to disable default(next/prev) buttons in winrt xaml
Upvotes: 0
Views: 817
Reputation: 2085
There are 2 options.
Option 1. In FlipView.Loaded
event dynamically remove the arrow buttons.
private void flipView_Loaded(object sender, RoutedEventArgs e)
{
Grid grid = (Grid)VisualTreeHelper.GetChild(flipView, 0);
for (int i = grid.Children.Count - 1; i >= 0; i--)
if (grid.Children[i] is Button)
grid.Children.RemoveAt(i);
}
Option 2. Retemplate the FlipView
control (as Tim Heuer stated in his answer).
Upvotes: 2
Reputation: 4311
You would need to re-template the control and remove those elements.
Upvotes: 0