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


C# DelegateCommand.ObserveProperty方法代码示例

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


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

示例1: ConnectionEntryViewModel

        public ConnectionEntryViewModel(IPipServicesClient client, string userID, Connection entity, bool isRead)
        {
            if (client == null)
                throw new ArgumentNullException(nameof(client));
            if (userID == null)
                throw new ArgumentNullException(nameof(userID));
            if (entity == null)
                throw new ArgumentNullException(nameof(entity));

            _client = client;
            _userID = userID;
            _entity = entity;
            _isRead = isRead;
            _commandAdd = new DelegateCommand(CommandAddAction, CommandAddPredicate);
            _commandAdd.ObserveProperty(() => HasActiveTask);
            _commandAdd.ObserveProperty(() => IsRead);
        }
开发者ID:maksym-fedorov-epam,项目名称:pip-statuses,代码行数:17,代码来源:ConnectionEntryViewModel.cs

示例2: SignInPageViewModel

        public SignInPageViewModel(INavigationService navigationService, IDialogService dialogService, IStorageService storage, IPipServicesClient client)
            : base(navigationService)
        {
            if (dialogService == null)
                throw new ArgumentNullException(nameof(dialogService));
            if (storage == null)
                throw new ArgumentNullException(nameof(storage));
            if (client == null)
                throw new ArgumentNullException(nameof(client));

            _dialogService = dialogService;
            _storage = storage;
            _client = client;

            _commandSignIn = new DelegateCommand(CommandSignInAction, CommandSignInPredicate);
            _commandNavigateSignUp = new DelegateCommand(CommandNavigateSignUpAction);
            _commandCancel = new DelegateCommand(CommandCancelInAction);

            _commandSignIn.ObserveProperty(() => Server);
            _commandSignIn.ObserveProperty(() => ID);
            _commandSignIn.ObserveProperty(() => Key);
        }
开发者ID:maksym-fedorov-epam,项目名称:pip-statuses,代码行数:22,代码来源:SignInPageViewModel.cs

示例3: HomePageViewModel

        public HomePageViewModel(INavigationService navigationService, IDialogService dialogService, IPipServicesClient client)
            : base(navigationService)
        {
            if (dialogService == null)
                throw new ArgumentNullException(nameof(dialogService));
            if (client == null)
                throw new ArgumentNullException(nameof(client));

            _dialogService = dialogService;
            _client = client;

            _commandCreate = new DelegateCommand(CommandCreateAction, CommandCreatePredicate);
            _commandUpdate = new DelegateCommand(CommandUpdateAction, CommandUpdatePredicate);
            _commandRemove = new DelegateCommand(CommandRemoveAction, CommandRemovePredicate);
            _commandRefresh = new DelegateCommand(CommandRefreshAction, CommandRefreshPredicate);
            _commandComment = new DelegateCommand(CommandCommentAction, CommandCommentPredicate);
            _commandModifyReadingList = new DelegateCommand(CommandModifyReadingListAction);
            _commandSignOut = new DelegateCommand(CommandSignOutAction);
            _commandRemoveComment = new DelegateCommand<CommentEntryViewModel>(CommandRemoveCommentAction);
            _commandStopReading = new DelegateCommand<ConnectionEntryViewModel>(CommandStopReadingAction);

            _commandCreate.ObserveProperty(() => HasActiveTask);

            _commandUpdate.ObserveProperty(() => SelectedEntryJournal);
            _commandUpdate.ObserveProperty(() => HasActiveTask);
            _commandUpdate.ObserveProperty(() => SelectedMenuIndex);

            _commandRemove.ObserveProperty(() => SelectedEntryJournal);
            _commandRemove.ObserveProperty(() => HasActiveTask);
            _commandRemove.ObserveProperty(() => SelectedMenuIndex);

            _commandRefresh.ObserveProperty(() => HasActiveTask);

            _commandComment.ObserveProperty(() => SelectedMenuIndex);
            _commandComment.ObserveProperty(() => HasActiveTask);
            _commandComment.ObserveProperty(() => SelectedEntryJournal);
            _commandComment.ObserveProperty(() => SelectedEntryPublic);
        }
开发者ID:maksym-fedorov-epam,项目名称:pip-statuses,代码行数:38,代码来源:HomePageViewModel.cs

示例4: WritePostPageViewModel

        public WritePostPageViewModel(INavigationService navigationService, IDialogService dialogService, IPipServicesClient client)
            : base(navigationService)
        {
            if (dialogService == null)
                throw new ArgumentNullException(nameof(dialogService));
            if (client == null)
                throw new ArgumentNullException(nameof(client));

            _dialogService = dialogService;
            _client = client;

            _commandCreate = new DelegateCommand(CommandCreateAction, CommandCreatePredicate);

            _commandCreate.ObserveProperty(() => Content);
        }
开发者ID:maksym-fedorov-epam,项目名称:pip-statuses,代码行数:15,代码来源:WritePostPageViewModel.cs

示例5: ReadPostPageViewModel

        public ReadPostPageViewModel(INavigationService navigationService, IDialogService dialogService, IPipServicesClient client)
            : base(navigationService)
        {
            if (dialogService == null)
                throw new ArgumentNullException(nameof(dialogService));
            if (client == null)
                throw new ArgumentNullException(nameof(client));

            _dialogService = dialogService;
            _client = client;

            _commandRefresh = new DelegateCommand(CommandRefreshAction, CommandRefreshPredicate);
            _commandComment = new DelegateCommand(CommandCommentAction, CommandCommentPredicate);
            _commandUpdate = new DelegateCommand(CommandUpdateAction, CommandUpdatePredicate);
            _commandRemove = new DelegateCommand(CommandRemoveAction, CommandRemovePredicate);

            _commandRefresh.ObserveProperty(() => HasActiveTask);
            _commandComment.ObserveProperty(() => HasActiveTask);
            _commandUpdate.ObserveProperty(() => HasActiveTask);
            _commandRemove.ObserveProperty(() => HasActiveTask);
        }
开发者ID:maksym-fedorov-epam,项目名称:pip-statuses,代码行数:21,代码来源:ReadPostPageViewModel.cs


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