summaryrefslogtreecommitdiff
path: root/Juick/ViewModels/ThreadViewModel.cs
blob: 1cbaab7a50a0ebcf4af6253584fedfdb5e7de951 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using Juick.Classes;

namespace Juick.ViewModels
{
    public class ThreadViewModel : ViewModelBase
    {
        static readonly string CaptionPropertyName = ExpressionHelper.GetPropertyName<ThreadViewModel>(x => x.Caption);

        private int _mid;
        public int Mid
        {
            get { return _mid; }
            set 
            { 
                _mid = value;
                RestUri = string.Format("/thread?mid={0}", _mid);
                NotifyPropertyChanged(CaptionPropertyName);
            }
        }

        public override string Caption {
            get { return "#" + _mid; }
        }
    }
}