I am developing an app on win8 and would like to add an 'AddToFavorites' button on the application bar, so that the user can select his favorites/bookmarks and place them to this. I have added this button to the application bar but the button does not perform any action when clicked.
Currently what I have done is
private async void Favorite_Button_Click(object sender, RoutedEventArgs e)
{
if (SampleDataSource.GetGroup("Favorite").Items.Count != 0)
{
if (this.pageTitle.Text != "Favorite")
this.Frame.Navigate(typeof(ItemDetailPage), SampleDataSource.GetGroup("Favorite").Items[0].UniqueId);
}
else
{
await new Windows.UI.Popups.MessageDialog("You haven't marked any favorites.").ShowAsync();
}
}
But I dont see this functionality working. Any of your suggestions would be of great help to me. It is a Windows8 Metro style C#/XAML App. Thanks in Advance!