本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}