本文整理汇总了C#中UserModel.Loaded方法的典型用法代码示例。如果您正苦于以下问题:C# UserModel.Loaded方法的具体用法?C# UserModel.Loaded怎么用?C# UserModel.Loaded使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserModel
的用法示例。
在下文中一共展示了UserModel.Loaded方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: User
public User()
{
InitializeComponent(); Loaded += (sender, e) => { if (ApplicationBar != null) ApplicationBar.MatchOverriddenTheme(); };
viewModel = new UserModel();
DataContext = viewModel;
this.Loaded += (sender, e) =>
{
string userName;
if (!NavigationContext.QueryString.TryGetValue("user", out userName))
{
NavigationService.GoBack();
return;
}
viewModel.Loaded(userName);
};
viewModel.PropertyChanged += (sender, e) =>
{
if (e.PropertyName == "ScreenName")
{
TweetList.Resource = new TwitterResource { String = "Tweets:" + viewModel.ScreenName, User = DataTransfer.CurrentAccount};
TweetList.Load();
MentionsList.Resource = new TwitterResource { Data = "@" + viewModel.ScreenName, Type = ResourceType.Search, User = DataTransfer.CurrentAccount };
MentionsList.Load();
}
};
TweetList.Loader.PropertyChanged += (sender, e) =>
{
if (e.PropertyName == "IsLoading")
viewModel.IsLoading = TweetList.Loader.IsLoading;
};
MentionsList.Loader.PropertyChanged += (sender, e) =>
{
if (e.PropertyName == "IsLoading")
viewModel.IsLoading = MentionsList.Loader.IsLoading;
};
TweetList.Loader.Cached = false;
MentionsList.Loader.Cached = false;
}