Click here to Skip to main content
15,667,466 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
private void Button_Click(object sender, RoutedEventArgs e)
              int selectedValue = (int)comboSelection.SelectedValue;
              if (selectedValue == 8)
                  EightTiles et = new EightTiles();
                  this.Visibility = Visibility.Collapsed;
                  et.Visibility = Visibility.Visible;

My target is when the combo box selection is equal to 8 then click the button, current usercontrol get collapsed and next usercontrol(EightTiles) get visible.
But my problem is when i click the button it shows a blank page, next user control page doesn't showed, what is the problem and how i do to solve it..
Updated 21-Oct-15 19:34pm

1 solution

The EightTiles instance you create here has nothing to do with any control you may have on the display. You create it, set it's visibility and then "drop it on the floor".
I presume you already have an EightTiles control on your window (or parent control). Here you need to set the visibility of that control.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900