当前位置: 首页>>代码示例>>C#>>正文


C# INavigationService.CanGoBack方法代码示例

本文整理汇总了C#中INavigationService.CanGoBack方法的典型用法代码示例。如果您正苦于以下问题:C# INavigationService.CanGoBack方法的具体用法?C# INavigationService.CanGoBack怎么用?C# INavigationService.CanGoBack使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在INavigationService的用法示例。


在下文中一共展示了INavigationService.CanGoBack方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: HubPageViewModel

        public HubPageViewModel(INavigationService navigationService, IPasswordRepository passwordRepository)
        {
            _navigationService = navigationService;
            _passwordRepository = passwordRepository;

            _passwordGroups = new ObservableCollection<PasswordGroup>();

            if (Windows.ApplicationModel.DesignMode.DesignModeEnabled)
            {
                PasswordGroups.Add(new PasswordGroup()
                {
                    GroupKey = "A"
                });
                PasswordGroups.Add(new PasswordGroup()
                {
                    GroupKey = "C"
                });
                PasswordGroups.Add(new PasswordGroup()
                {
                    GroupKey = "D"
                });
            }
            else
            {
                GetData();
            }

            AddNewPasswordCommand = new DelegateCommand(() => AddNewPassword());
            DeleteCommand = new DelegateCommand(() => Delete());
            CopyToClipboardCommand = new DelegateCommand(() => CopyToClipboard());
            GoBackCommand = new DelegateCommand(() => _navigationService.GoBack(), () => _navigationService.CanGoBack());
        }
开发者ID:hvining,项目名称:PasswordManager,代码行数:32,代码来源:HubPageViewModel.cs

示例2: BaseViewModel

 public BaseViewModel(INavigationService navService, IEventAggregator eventAggregator, IPurchaseManager purchaseMgr, IMessageSettingsRepository repository)
 {
     this._purchaseManager = purchaseMgr;
     this._eventAggregator = eventAggregator;
     this._navService = navService;
     this._messageRepository = repository;
     this.GoBackCommand = new DelegateCommand(OnGoBack, () => _navService.CanGoBack());
 }
开发者ID:Osceus,项目名称:Countdown,代码行数:8,代码来源:BaseViewModel.cs

示例3: EntityDetailPageViewModel

 public EntityDetailPageViewModel(IEntityRepository entityRepository, INavigationService navService, IEventAggregator eventAggregator) {
     _entityRepository = entityRepository;
     _navService = navService;
     _eventAggregator = eventAggregator;
     GoBackCommand = new DelegateCommand(
         () => _navService.GoBack(),
         () => _navService.CanGoBack());
     NewEntityCommand = new DelegateCommand(OnNewEntity, CanNewEntity);
     UpdateEntityCommand = new DelegateCommand(OnUpdateEntity, CanUpdateEntity);
     DeleteEntityCommand = new DelegateCommand(OnDeleteEntity, CanDeleteEntity);
     TextBoxLostFocusAction = OnTextBoxLostFocusAction;
 }
开发者ID:ronlemire2,项目名称:PrismRT-CodeGen-v2,代码行数:12,代码来源:EntityDetailPageViewModel.cs

示例4: StateDetailPageViewModel

 public StateDetailPageViewModel(IStateRepository stateRepository, INavigationService navService, IEventAggregator eventAggregator) {
     _stateRepository = stateRepository;
     _navService = navService;
     _eventAggregator = eventAggregator;
     GoBackCommand = new DelegateCommand(
         () => _navService.GoBack(),
         () => _navService.CanGoBack());
     NewStateCommand = new DelegateCommand(OnNewState, CanNewState);
     UpdateStateCommand = new DelegateCommand(OnUpdateState, CanUpdateState);
     DeleteStateCommand = new DelegateCommand(OnDeleteState, CanDeleteState);
     TextBoxLostFocusAction = OnTextBoxLostFocusAction;
 }
开发者ID:ronlemire2,项目名称:PrismRT-CodeGen-v2.1,代码行数:12,代码来源:StateDetailPageViewModel.cs

示例5: PersonDetailPageViewModel

 public PersonDetailPageViewModel(IPersonRepository personRepository, INavigationService navService, IEventAggregator eventAggregator) {
     _personRepository = personRepository;
     _navService = navService;
     _eventAggregator = eventAggregator;
     GoBackCommand = new DelegateCommand(
         () => _navService.GoBack(),
         () => _navService.CanGoBack());
     NewPersonCommand = new DelegateCommand(OnNewPerson, CanNewPerson);
     UpdatePersonCommand = new DelegateCommand(OnUpdatePerson, CanUpdatePerson);
     DeletePersonCommand = new DelegateCommand(OnDeletePerson, CanDeletePerson);
     TextBoxLostFocusAction = OnTextBoxLostFocusAction;
 }
开发者ID:ronlemire2,项目名称:PrismRT-CodeGen-v2.1,代码行数:12,代码来源:PersonDetailPageViewModel.cs

示例6: AddEditPasswordViewModel

        public AddEditPasswordViewModel(INavigationService navigationService, IPasswordRepository passwordRepository)
        {
            _navigationService = navigationService;
            _passwordRepository = passwordRepository;

            SaveCommand = new DelegateCommand(() => Save(), () => CanSave);
            CopyToClipboardCommand = new DelegateCommand(() => CopyToClipboard());
            GoBackCommand = new DelegateCommand(() => navigationService.GoBack(), () => navigationService.CanGoBack());

            KeyPressAction = (eventArgs) =>
                {
                    switch (eventArgs.Key)
                    {
                        case VirtualKey.Enter:
                            {
                                if(CanSave)
                                    SaveCommand.Execute();
                            }
                            break;
                        default:
                            break;
                    }
                };
        }
开发者ID:hvining,项目名称:PasswordManager,代码行数:24,代码来源:AddEditPasswordViewModel.cs


注:本文中的INavigationService.CanGoBack方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。