diff options
author | Vitaly Takmazov | 2013-05-08 16:12:45 +0400 |
---|---|---|
committer | Vitaly Takmazov | 2013-05-08 16:12:45 +0400 |
commit | 1a9bcf2f3ac5f40e8966fb365741d36906fd2e52 (patch) | |
tree | e26e99d15b678b8e59813b82e7d7e2d73d18bb03 /Juick/ViewModels/UserFeedViewModel.cs | |
parent | fa1170247a93bdbc6f9656b1d6f3be7b732d22af (diff) |
UserFeed
Diffstat (limited to 'Juick/ViewModels/UserFeedViewModel.cs')
-rw-r--r-- | Juick/ViewModels/UserFeedViewModel.cs | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/Juick/ViewModels/UserFeedViewModel.cs b/Juick/ViewModels/UserFeedViewModel.cs new file mode 100644 index 0000000..597687f --- /dev/null +++ b/Juick/ViewModels/UserFeedViewModel.cs @@ -0,0 +1,41 @@ +using System; +using System.Net; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Documents; +using System.Windows.Ink; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Animation; +using System.Windows.Shapes; +using Juick.Classes; +using JuickApi; + +namespace Juick.ViewModels +{ + public class UserFeedViewModel : PageViewModel + { + public UserFeedViewModel(AppViewModel context) : base(context) + { + + } + static readonly string CaptionPropertyName = ExpressionHelper.GetPropertyName<ThreadViewModel>(x => x.Caption); + + private int _uid; + public int Uid + { + get { return _uid; } + set + { + _uid = value; + RestUri = string.Format("/messages?user_id={0}", _uid); + NotifyPropertyChanged(CaptionPropertyName); + } + } + + public override string Caption + { + get { return Items.Count == 0 ? "": Items[0].Username; } + } + } +} |