最佳实践,用于存储用户界面设置? [英] Best practices for storing UI settings?

查看:176
本文介绍了最佳实践,用于存储用户界面设置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们目前正在规划一个更大的WPF LOB应用程序和我不知道别人怎么想,是存储大量的UI设置,例如:

we're currently planning a larger WPF LoB application and i wonder what others think being the best practice for storing lots of UI settings e.g.


    最好的做法
  • 扩展美国

  • 菜单命令

  • 上浆属性

  • 等...

  • Expander States
  • Menu orders
  • Sizing Properties
  • etc...

我不喜欢使用的交付SettingsProvider(即App.config文件),具有数十种存储值的想法,虽然它可以被用来存储它在嵌入式数据库中使用自定义SettingsProvider。
能够使用某种类型的数据绑定也是一个关注的问题。
有没有人有同样的问题?

i don't like the idea of having dozens of stored values using the delivered SettingsProvider (i.e. App.config file) although it can be used to store it in an embedded database using a custom SettingsProvider. being able to use some kind of databinding is also a concern. Has anyone had the same problems?

你做了什么来存储大量的UI用户设置?

What did you do to store lots of ui user settings?

推荐答案

我们存储的喜好在这里提交:

We store the preferences file here:

Environment.SpecialFolder.ApplicationData

所以它不是这么难去,如果它曾经被破坏更改保存为XML首选项文件。

Store it as xml "preferences" file so it's not so hard to get to and change if it ever gets corrupted.

到目前为止,这比工作注册表好得多对我们来说,它的清洁和更容易吹熄如果有任何被破坏或需要重置。

So far this has worked much better than the registry for us, it's cleaner and easier to blow out if anything gets corrupted or needs to be reset.

这篇关于最佳实践,用于存储用户界面设置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆