public NewOpinionViewModel(SubjectVmi selectedChildSubject, OpinionVmi selectedChildOpinion, Action <OpinionVmi> returnAction) : base() { CurrentSubject = selectedChildSubject; CurrentOpinion = selectedChildOpinion; ReturnAction = returnAction; }
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(); }
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(); }
protected List <OpinionVmi> GetOpinions(OpinionVmi currentOpinion) { return(new List <OpinionVmi>() { }); }
private void OnReturnFromNewOpinion(OpinionVmi opinion) { Opinions.Insert(0, opinion); }