C#C
C#3y ago
5 replies
Mek

✅ [solved] Learning Desktop App WPF Application

Ok. So I've built the front-end part of the welcome screen. I'm learning how to do this so be gentle please lol but it's my math game. I'm taking it from a console based app to an actual desktop app. So my question is, I have 2 sets of radio button selections, a combobox, and 2 buttons.
using System, System.Collections.Generic, System.Linq, System.Text, System.Threading.Tasks, System.Windows, System.Windows.Controls, System.Windows.Data, System.Windows.Documents, System.Windows.Input, System.Windows.Media, System.Windows.Media.Imaging, System.Windows.Navigation, System.Windows.Shapes;

namespace MeksMathGameGUI
{
    public partial class MainWindow : Window
    {
        public MainWindow() { InitializeComponent(); }

        private void ExitApplication_CLick(object sender, RoutedEventArgs e) { Environment.Exit(0); }

        private void StartGame_Click(object sender, RoutedEventArgs e)
        {
            Console.WriteLine("Start Game Button Clicked!");
        }
    }
}
In my
StartGame_Click
method, I want to be able to capture the input from the radio buttons so that I can pass the needed information to the required functions. How do I get the radio button selections?
Was this page helpful?