コード例 #1
0
        public PageRendererTestPageViewModel(INavigationService navigationService, CoreModel coreModel) : base(navigationService)
        {
            KeyHistory     = coreModel.ObserveProperty(x => x.KeyHistory).ToReadOnlyReactiveProperty();
            KeyDownCommand = new ReactiveCommand <string>().WithSubscribe(x => coreModel.SetKeyHistory(x));

            MethodHistory = coreModel.ObserveProperty(x => x.MethodHistory).ToReadOnlyReactiveProperty();
            CommandA.Subscribe(_ => coreModel.MethodA());
            CommandB.Subscribe(_ => coreModel.MethodB());
            CommandC.Subscribe(_ => coreModel.MethodC());
        }