Forgive me as I am very new but what am I doing wrong here? I am just trying to create a couple of public text boxes... and I am getting a stack overflow error
namespace WpfApp3
{
public partial class MainWindow : Window
{
public Canvas all = new Canvas();
public System.Windows.Controls.TextBox t12 = new System.Windows.Controls.TextBox();
public System.Windows.Controls.TextBox t13 = new System.Windows.Controls.TextBox();
public readonly Window hi = new MainWindow();
<Window x:Class="WpfApp3.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApp3"
mc:Ignorable="d"
Title="MainWindow" Height="1080" Width="1920" WindowStartupLocation="Manual" Topmost="True">
<Grid>
</Grid>
</Window>
CodePudding user response: