From acca89315ee8ae3a0c0b4514827eb2cb73808741 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Sat, 2 Feb 2013 15:47:01 +0400 Subject: add Caption to ViewModel --- Juick/ViewModels/ThreadViewModel.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Juick/ViewModels/ThreadViewModel.cs') diff --git a/Juick/ViewModels/ThreadViewModel.cs b/Juick/ViewModels/ThreadViewModel.cs index 4a80f31..ec1f92d 100644 --- a/Juick/ViewModels/ThreadViewModel.cs +++ b/Juick/ViewModels/ThreadViewModel.cs @@ -1,9 +1,11 @@ -using System; +using Juick.Classes; namespace Juick.ViewModels { public class ThreadViewModel : MessageListViewModelBase { + static readonly string CaptionPropertyName = ExpressionHelper.GetPropertyName(x => x.Caption); + private int _mid; public int Mid { @@ -12,7 +14,12 @@ namespace Juick.ViewModels { _mid = value; RestUri = string.Format("/thread?mid={0}", _mid); + NotifyPropertyChanged(CaptionPropertyName); } } + + public override string Caption { + get { return "#" + _mid; } + } } } -- cgit v1.2.3