public MainWindow() { // This line must be executed first: InitializeComponent(); // Own stuff here: cs = new CStack(); LetterField.Text = "T:\nZ:\nY:\nX:\n▹"; VarLetterField.Text = $"A=\nB=\nC=\nD =\nE=\nF=\nG=\nH=\n▹"; UpdateNumberField(); }