相关疑难解决方法(0)

Equivalent to UserSettings / ApplicationSettings in WPF dotnet core

What is the prefered way for persisting user settings for WPF applications with .Net Core >=3.0?

Created WPF .Net Core 3.0 Project (VS2019 V16.3.1) Now I have seen there is no Properties.Settings section anymore.

解决方案资源管理器

After online search, started to dive into Microsoft.Extensions.Configuration.

Beside the bloated code to access the settings, now even worse -> No save?
User Configuration Settings in .NET Core

幸运的是,Microsoft.Extensions.Configuration不支持按设计保存。阅读此Github问题中的更多内容为什么ConfigurationProvider中没有保存?


对于.Net Core> = 3.0的WPF应用程序,要保留用户设置的首选(便捷/快速/简单)方式是什么?


之前<= .Net 4.8一样简单:

  • 将变量添加到属性。 用户设置

  • 在启动时读取变量
    var culture = new CultureInfo(Properties.Settings.Default.LanguageSettings); …

c# wpf .net-core

14
推荐指数
6
解决办法
2152
查看次数

标签 统计

.net-core ×1

c# ×1

wpf ×1