Пример #1
0
 public NewOpinionViewModel(SubjectVmi selectedChildSubject,
                            OpinionVmi selectedChildOpinion, Action <OpinionVmi> returnAction) : base()
 {
     CurrentSubject = selectedChildSubject;
     CurrentOpinion = selectedChildOpinion;
     ReturnAction   = returnAction;
 }
Пример #2
0
        public NewOpinionView(DataSourceContext dataSourceContext,
                              SubjectVmi selectedChildSubject,
                              OpinionVmi selectedChildOpinion,
                              Action <OpinionVmi> returnAction)
        {
            InitializeComponent();

            ViewModel = new NewOpinionViewModel(selectedChildSubject, selectedChildOpinion, returnAction);
            ViewModel.DataSourceContext      = dataSourceContext;
            ViewModel.DataSourceContextIndex = ViewModel.DataSourceContext.ContextItems.Count;

            BindControls();
        }
Пример #3
0
        public OpinionListItem(OpinionVmi opinion)
        {
            InitializeComponent();

            _opinion = opinion;

            IconView.Context = opinion;


            if (string.IsNullOrWhiteSpace(opinion.Body))
            {
                LabelBody.IsVisible = false;
            }
            else
            {
                LabelBody.Text = opinion.Body;
            }

            LabelTitle.Text   = opinion.Title;
            LabelTitle.IsBold = opinion.IsNew;
            LabelBody.IsBold  = opinion.IsNew;

            SetSelectedState();
        }
Пример #4
0
 protected List <OpinionVmi> GetOpinions(OpinionVmi currentOpinion)
 {
     return(new List <OpinionVmi>()
     {
     });
 }
Пример #5
0
 private void OnReturnFromNewOpinion(OpinionVmi opinion)
 {
     Opinions.Insert(0, opinion);
 }