public override void ViewDidLoad() { base.ViewDidLoad(); ViewModel = ContentItemViewModel.Create(ContentItemId); _contentItemBinding = this.SetBinding(() => ViewModel.ContentItem).WhenSourceChanges(Update); }
public override void ViewDidLoad() { base.ViewDidLoad(); ViewModel = ContentItemViewModel.Create(ContentItemId); _contentItemBinding = this.SetContentBinding(() => ViewModel.ContentItem, () => this.ScrollView); }
public override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); var contentItemId = Arguments.GetInt(MphExtras.ContentItemId); if (contentItemId == -1) { throw new ArgumentException("ContentItemFragment must be started with an int extra for the content item id."); } ViewModel = ContentItemViewModel.Create(contentItemId); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.Main); var toolbar = FindViewById <Toolbar>(Resource.Id.toolbar); SetSupportActionBar(toolbar); ViewModel = ContentItemViewModel.Create(14); ViewModel.PropertyChanged += ViewModel_PropertyChanged; var swipeRefreshLayout = FindViewById <SwipeRefreshLayout>(Resource.Id.swipeRefreshLayout); swipeRefreshLayout.Refresh += SwipeRefreshLayout_Refresh; }