How to switch between windows in the same window WPF

Viewed 179

I am trying to make a brain exercise app, and I want to make the buttons on my home screen [of the app] to a different view. This is my apps home screen: Home Screen UI

For example if I click the "Math" button, I want the app to lead me to the MathScreen.xaml. I looked into this online, and found a few key words like MVVM. I am unable to add such things into my app because I found most instructions unclear. So does anyone know how to make the Math Button lead me to my next screen [WPF Window]? It would be better if the new window doesn't have to open in a new Window and could just stay on the same window.

Code Of My Math Button:

 <Button Margin="49,47,850,315" BorderThickness="0" Background="#933861" Cursor="Hand" Click="Math_Button_Click" x:Name="MathButton">
            <Button.Resources>
                <Style TargetType="{x:Type Border}">
                    <Setter Property="CornerRadius" Value="50"/>
                </Style>
            </Button.Resources>
            <Button.Effect>
                <DropShadowEffect BlurRadius="100" Color="#FFBF477D"/>
            </Button.Effect>
            <TextBlock HorizontalAlignment="Center" Text="MATH" Foreground="#dfa7e4" TextWrapping="Wrap" VerticalAlignment="Center" FontFamily="Trebuchet MS" Height="78" Width="195" FontSize="78"/>
        </Button>

Code for "Math_Button_Click":

        // MATH BUTTON
        private void Math_Button_Click(object sender, RoutedEventArgs e)
        {

        }

[Just empty]

0 Answers
Related