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

            _viewModel = ViewModelProviders.Of(this).Get(DependencyLocator.Current.CreateCharactersViewModel);
            _viewModel.ViewDidLoad();
        }
示例#2
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            _viewModel = DependencyLocator.Current.CreateCharactersViewModel();
            _viewModel.ViewDidLoad();

            var source = new ObservingPlainTableViewSource <CharacterCellViewModel>(_viewModel.Characters, BindCharacterTableViewCell, nameof(CharacterTableViewCell));

            source.WillDisplayCellDelegate = WillDisplayCell;
            TableView.Source = source;

            SetBindings();
        }