问题
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
回答1:
You would need to re-template the control and remove those elements.
回答2:
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).
来源:https://stackoverflow.com/questions/18216402/how-to-disable-default-next-prev-buttons-of-flip-in-winrt-xaml