IoC and NavigationService implementation

This commit is contained in:
2011-03-25 11:22:57 +02:00
parent 98c8cf3f94
commit f069ee7010
31 changed files with 1139 additions and 73 deletions
@@ -51,14 +51,6 @@ namespace MyFriendsAround.WP7.ViewModel
}
}
public string Welcome
{
get
{
return "Welcome to MVVM Light";
}
}
/// <summary>
/// Initializes a new instance of the MainViewModel class.
/// </summary>
@@ -68,6 +60,7 @@ namespace MyFriendsAround.WP7.ViewModel
PublishLocationCommand = new RelayCommand(() => PublishLocationAction());
DisplayAboutCommand = new RelayCommand(() => DisplayAbout());
InputBoxCommand = new RelayCommand(() => InputBox());
NavigateToAboutCommand = new RelayCommand(() => NavigateToAbout());
if (IsInDesignMode)
{
@@ -82,6 +75,12 @@ namespace MyFriendsAround.WP7.ViewModel
}
private void NavigateToAbout()
{
//
this.PageNav.NavigateTo(new Uri("/Views/AboutPage.xaml", UriKind.Relative));
}
private void InputBox()
{
MessageBox.Show("Input box");
@@ -102,7 +101,7 @@ namespace MyFriendsAround.WP7.ViewModel
//f.LocationStr
result.Add(new PushPinModel()
{
PinSource = "ApplicationIcon.png",
PinSource = "/ApplicationIcon.png",
Location = new GeoCoordinate(f.Latitude, f.Longitude)
});
});
@@ -161,10 +160,17 @@ namespace MyFriendsAround.WP7.ViewModel
}
}
public RelayCommand PublishLocationCommand { get; set; }
public RelayCommand DisplayAboutCommand { get; set; }
public RelayCommand InputBoxCommand { get; set; }
public ICommand PublishLocationCommand { get; set; }
public ICommand DisplayAboutCommand { get; set; }
public ICommand InputBoxCommand { get; set; }
public ICommand NavigateToAboutCommand
{
get;
private set;
}
public string MyName { get; set; }
public string AppBarTextAbout {