コード例 #1
0
        public override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            this.viewModel = new SimpleViewModel();

            // we can either put this here or in will appear (onResume), depending on what we need to do with loading for the VM.
            this.loader = new ViewModelLoader<string>(this.GetHelloWorld, this.UpdateViewModel, new UIThreadScheduler());
        }
コード例 #2
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            this.viewModel = new SimpleViewModel();

            // we can either put this here or in will appear, depending on what we need to do with loading for the VM.
            this.loader = new ViewModelLoader<string>(this.GetHelloWorld, this.UpdateViewModel, new UIThreadScheduler());

            // 
            this.NavigationItem.RightBarButtonItem = new UIBarButtonItem(UIBarButtonSystemItem.Play, (s, e) =>
            {
                    this.NavigationController.PushViewController(new SimpleListController(), true);
            });
        }
コード例 #3
0
        public override Android.Views.View OnCreateView(Android.Views.LayoutInflater inflater, Android.Views.ViewGroup container, Bundle savedInstanceState)
        {
            this.source = new GroupedListSource(this.Activity, DialogDataTemplates.DefaultTemplates(this.Activity));

            // we can either put this here or in will appear, depending on what we need to do with loading for the VM.
            this.loader = new ViewModelLoader<string>(this.GetHelloWorld, this.UpdateViewModel, new UIThreadScheduler());

            return base.OnCreateView(inflater, container, savedInstanceState);
        }