在窗口之间切换后需要保持值。 [英] Need to hold values after switching between windows.

查看:61
本文介绍了在窗口之间切换后需要保持值。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在窗口之间切换后需要保存多个控件的值。

Need to hold values of Multiple Controls after switching between windows.

尝试解决方案:Singleton 

Tried Solutions : Singleton 

问题:正在制作应用程序缓慢,因为整个窗口都是静态的。

Problem : Its making application Slow as the entire window is Static.

请告诉我哪种方法可以更好地在窗口之间切换后保存多个控件的值。




推荐答案

您可以将选择保存在某些文件或应用程序设置中,也可以保存在SQLite等数据库中。

Probably you can save the selection in some file or application settings or may be in a database like SQLite.

以下是保存在应用程序设置中的几个示例。

Below are few examples to save in application settings.

http://geekswithblogs.net/mbcrump/archive/2010/06/17/configuring-applicationuser-settings-in-wpf-the-easy-way.aspx

https://stackoverflow.com/a/29766700

https://www.codeproject.com/Articles/474142/Saving-and-Loading-All-Control-Values-to-User -Sett


这篇关于在窗口之间切换后需要保持值。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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