private void UpdateMenuItems()
{
if (_appBarButtons == null || ApplicationBar.Buttons.Count == 0)
BuildAppBar();
var vm = this.DataContext as MessagesViewModel;
if (vm != null)
{
// TODO: If item in current pivot selected, enable reply/delete
if (vm.SelectedItem != null)
{
if (vm.SelectedItem.IsPostReply || vm.SelectedItem.IsCommentReply || vm.SelectedItem.IsUserMention)
{
_appBarButtons[1].Text = "context";
_appBarButtons[1].IconUri = new Uri("\\Assets\\Icons\\goto.png", UriKind.Relative);
}
else
{
_appBarButtons[1].IconUri = new Uri("\\Assets\\Icons\\reply.png", UriKind.Relative);
_appBarButtons[1].Text = "reply";
}
_appBarButtons[1].IsEnabled = true;
}
else
{
_appBarButtons[1].IsEnabled = false;
}
}
}