Home > Back-end >  Visual Studio 2022 winform designer does not show ApplicationSettings in the property window of any
Visual Studio 2022 winform designer does not show ApplicationSettings in the property window of any

Time:01-03

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));
        
  • Related