且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

C# - 在 WPF 应用程序中保存用户设置的方法?

更新时间:2023-10-16 18:10:46

您可以使用 应用程序设置 对此,考虑到读取和写入设置所消耗的时间(特别是如果您使用 Web 服务),使用数据库并不是***选择.

You can use Application Settings for this, using database is not the best option considering the time consumed to read and write the settings(specially if you use web services).

这里有几个链接解释了如何实现这一点并在 WPF 中使用它们 -

Here are few links which explains how to achieve this and use them in WPF -

WPF 中的用户设置

快速 WPF 提示:如何绑定到 WPF 应用程序资源和设置?

WPF 的可配置窗口