I wrote my first C# program a while ago. It got somewhat big. My .settings file has over 20 different parameters - booleans, sizes, strings, ints. I'd like to provide users with a GUI to change them during runtime instead of editing the app.exe.config file which is somewhat advanced and confusing.
I'm very inexperienced with C# but seems like there should be a better way than for me to manually create a form, drag in labels, inputs, checkboxes, radio buttons, and manually handle all gui events and what happens when values get changed and whatnot. Building this gui by hand seems like a lot of work.
How do you guys handle the settings of a C# app? Can't I generate something from the XML?
In WinForms applications you can add a control to a Form and then click the (PropertyBinding) under (ApplicationSettings) in the Property box.
The dialog allows you to bind properties of the control to a parameter in the config file. It is an extra step during design but it must be done.
These settings will end up in the user config file (I strongly advise against the application config file for this)
You will have to provide the user with a way to specify these settings by either:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With