textbox binding

refresh command
This commit is contained in:
2011-03-28 09:34:32 +03:00
parent a25a7fb3fd
commit a4c09735f0
12 changed files with 46 additions and 15 deletions
@@ -56,11 +56,12 @@ namespace MyFriendsAround.WP7.ViewModel
/// </summary>
public MainViewModel()
{
MyName = "Guest";
//
PublishLocationCommand = new RelayCommand(() => PublishLocationAction());
DisplayAboutCommand = new RelayCommand(() => DisplayAbout());
InputBoxCommand = new RelayCommand(() => InputBox());
NavigateToAboutCommand = new RelayCommand(() => NavigateToAbout());
RefreshFriendsCommand = new RelayCommand(() => RefreshFriends());
if (IsInDesignMode)
{
@@ -69,12 +70,16 @@ namespace MyFriendsAround.WP7.ViewModel
else
{
// Code runs "for real"
IsBusy = true;
ServiceAgent.GetFriends(this.GetFriendsResult);
}
}
private void RefreshFriends()
{
IsBusy = true;
ServiceAgent.GetFriends(this.GetFriendsResult);
}
private void NavigateToAbout()
{
//
@@ -163,12 +168,8 @@ namespace MyFriendsAround.WP7.ViewModel
public ICommand PublishLocationCommand { get; set; }
public ICommand DisplayAboutCommand { get; set; }
public ICommand InputBoxCommand { get; set; }
public ICommand NavigateToAboutCommand
{
get;
private set;
}
public ICommand NavigateToAboutCommand { get; set; }
public ICommand RefreshFriendsCommand { get; set; }
/// <summary>
@@ -206,6 +207,11 @@ namespace MyFriendsAround.WP7.ViewModel
get { return "Publish"; }
}
public string AppBarTextRefresh
{
get { return "Refresh"; }
}
////public override void Cleanup()
////{
//// // Clean up if needed