简体   繁体   中英

Application settings equivalent for Avalonia

I was checking out Avalonia for porting over a WPF project, but I saw under the project settings there is no tab for application settings, only for resources.

In the WPF version of the app, I use Settings.Default.Save() and Settings.Default.Reset() to work with my saved settings during runtime. Manually copying my settings file over to my Avalonia version lets me access them with Settings.Default.[field name] , but I can no longer save or reset them.

I was wondering if Avalonia had an option for settings, but I haven't found one in the documentation. Is there an option for this, or should I save them manually to a file: and if so, how would I go about doing this?

Figured it out. Installing the NuGet package System.Configuration.ConfigurationManager did the trick in resolving the error. I didn't realize I needed to install this since it was included with the default WPF project.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM