Complete the following steps:
The C1CoverFlow1_SelectedIndexChanged event handler is added to your project.
Replace the code comment with the following code:
Visual Basic |
Copy Code
|
---|---|
If C1CoverFlow1.SelectedIndex = 1 Then TextBlock1.Text = "Deep Purple: Machine Head" ElseIf C1CoverFlow1.SelectedIndex = 2 Then TextBlock1.Text = "Deep Purple: Made in Japan" ElseIf C1CoverFlow1.SelectedIndex = 3 Then TextBlock1.Text = "Deep Purple: Perfect Strangers" Else TextBlock1.Text = Nothing End If |
C# |
Copy Code
|
---|---|
if (C1CoverFlow1.SelectedIndex == 1) { TextBlock1.Text = "Deep Purple: Machine Head"; } else if (C1CoverFlow1.SelectedIndex == 2) { TextBlock1.Text = "Deep Purple: Made in Japan"; } else if (C1CoverFlow1.SelectedIndex == 3) { TextBlock1.Text = "Deep Purple: Perfect Strangers"; } else { TextBlock1.Text = null; } |
In this step, you added an event handler and code to your project. In the next step, you’ll run program and see the results of this quick start topic.