In VS 2022 I create a new winform (.net 6.0) project. I put one textbox on the form. In the properties window, at the top, I'm used to seeing an item "ApplicationSettings" where I can bind the TEXT property of the textbox to an application setting. But I no longer see the line for "ApplicationSettings". If I open an older winform project it works as expected.
CodePudding user response:
The feature is (still) not available for WinForms .NET 6 but if you create a WinForms .NET framework project, it's available.
As a workaround, you can create the Application Settings yourself and add a user-scoped property like Property1
, then setup a databinding in code, like this:
this.textBox1.DataBindings.Add(new Binding("Text",
Properties.Settings.Default, "Property1", true,
DataSourceUpdateMode.OnPropertyChanged));