I have a button 'ReadMore'
defined Page.xaml. How may I enable it again when I click on a button that closes ThumbnailDetails.xaml
? Users select an item @ a ListBox
and they are directed to ThumbnailDetails.xaml
by the way.
Somehow it's not working?
Page.xaml.cs:
void NewsList_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
StaffNews news = (StaffNews) NewsList.SelectedItem;
if (news != null)
{
DetailsView.DataContext = news;
DetailsView.Visibility = Visibility.Visible;
//testing!!!
ReadMore.IsEnabled = false;
}
}
ThumbnailDetails.xaml.cs
//set the Visibility of the UserControl to "Collapsed" -
//which will cause it to disappear from the screen and
//return the user to the content below it:
void CloseBtn_Click(object sender, RoutedEventArgs e)
{
Visibility = Visibility.Collapsed;
//testing if button ReadMore will be reenabled on closebtn_clicked
Page a = new Page();
a.ReadMore.IsEnabled = true;
}