I develop a game guide application with c# for windows 8. I'm trying to put 2 youtube videos in a specific chapter of the game and I want to change the Uri of the Webview via a button. when the button is not pressed the first video uri is to be shown and when the button IS pressed the second video is to be shown. how can I do that? for example:
private void Chapters_SelectionChanged(object sender, Windows.UI.Xaml.Controls.SelectionChangedEventArgs e)
{
switch (Chapters.SelectedIndex)
{
case 0:
Chapter2C.Visibility = Visibility.Visible;
Chapter2T.Visibility = Visibility.Visible;
next_but.Visibility = Visibility.Visible;
prev_but.Visibility = Visibility.Visible;
Mywebview.Visibility = Visibility.Visible;
if (next_button.Clicked)
{
Mywebview.Source = new Uri("http://www.youtube.com/embed/F65paVQ0wn8?feature=player_detailpage")
}
else
{
Mywebview.Source = new Uri ("http://www.youtube.com/embed/rLdrc7K5vdw");
}
break;
}
}
anyone??