Пример #1
0
        protected override void BindModelBasic()
        {
            ViewModel.AnimeItemDisplayContext = ViewModelLocator.AnimeList.AnimeItemsDisplayContext;

            (RootContainer.GetChildAt(0) as ViewGroup).GetChildAt(0).SetBackgroundResource(_position % 2 == 0
                ? ResourceExtension.BrushRowAlternate1Res
                : ResourceExtension.BrushRowAlternate2LighterRes);

            AnimeCompactItemType.Text  = ViewModel.PureType;
            AnimeCompactItemTitle.Text = ViewModel.Title;

            AnimeCompactItemFavouriteIndicator.Visibility =
                ViewModel.IsFavouriteVisibility ? ViewStates.Visible : ViewStates.Gone;

            AnimeCompactItemTagsButton.Visibility = ViewModel.TagsControlVisibility
                ? ViewStates.Visible
                : ViewStates.Gone;

            AnimeCompactItemGlobalScore.Text = ViewModel.GlobalScoreBind;

            if (string.IsNullOrEmpty(ViewModel.TopLeftInfoBind))
            {
                AnimeCompactItemTopLeftInfo.Visibility = ViewStates.Gone;
            }
            else
            {
                AnimeCompactItemTopLeftInfo.Visibility = ViewStates.Visible;
                AnimeCompactItemTopLeftInfo.Text       = ViewModel.TopLeftInfoBind;
            }


            AnimeCompactItemScoreLabel.Text    = ViewModel.MyScoreBind;
            AnimeCompactItemStatusLabel.Text   = ViewModel.MyStatusBind;
            AnimeCompactItemWatchedButton.Text = ViewModel.MyEpisodesBind;
        }