How to stop pivot looping

前端 未结 6 1913
礼貌的吻别
礼貌的吻别 2021-01-11 22:34

I want to create a wizard control from the pivot control. To achieve this I need to stop the pivot looping. I want to stop the pivot control moving forward from the last ite

6条回答
  •  遥遥无期
    2021-01-11 23:23

    This is so weird because it only works in the Emulator. I guess you shan't mess with the UI

    You can use MVVM:

    
    

    Cs:

        private class HelpViewModel : ViewModelBase
        {
            public HelpViewModel()
            {
    
            }
    
            private int _SelectedItem = 0;
            public int SelectedItem
            {
                get
                {
                    return _SelectedItem;
                }
                set
                {
                    if (_SelectedItem != value)
                    {
                        if (value == 3)
                            _SelectedItem = 0;
                        else
                            _SelectedItem = value;
                        RaisePropertyChanged(() => SelectedItem);
                    }
                }
            }
        }
    
    
        public AppHelpPivot()
        {
            InitializeComponent();
            LayoutRoot.DataContext = new HelpViewModel();
        }
    

提交回复
热议问题