是否有推荐的方法在 Blend 4 Sketchflow 中的屏幕之间共享状态?

发布于 2024-09-13 09:48:46 字数 257 浏览 1 评论 0原文

我正在 Blend 4 中开发 Sketchflow 原型,我需要在整个应用程序中共享一些状态 - 例如 - 屏幕 1 上当前选定的项目。我考虑过使用数据存储,但它只能存储简单类型(字符串、布尔值、等)我想在那里存储整个对象,然后从其他屏幕对其进行数据绑定。

如果没有必要的话,我不想诉诸共享视图模型 - 这是一个废弃的原型,并且不想像真正的应用程序一样开始构建它。

Sketchflow 中现有的设施有什么想法可以让这一切变得简单吗?

谢谢 迈克尔

I am developing a Sketchflow prototype in Blend 4 and I need to share some state across the entire app - for instance - the currently selected item on screen 1. I looked at using a Datastore but it can only store simple types (strings, booleans,etc.) I want to store an entire object in there and then databind to it from other screens.

I didn't want to have to resort to a shared viewmodel if I didn't have to - it is a throw away prototype and didn't want to start architecting it like a real app.

Any ideas of exisitng facilities in Sketchflow that make this easy?

thanks
Michael

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

驱逐舰岛风号 2024-09-20 09:48:46

数据存储可能是最简单的,但您还可以执行其他相对简单、一次性的操作。

  1. app.xaml.cs 文件中的静态变量
  2. 编写您自己的行为,该行为具有静态变量来存储全局状态

The datastore is probably the simplest, but there are other relatively simple, throw away style things you can do.

  1. Static variables in your app.xaml.cs files
  2. Write your own behavior that has static variables to store global state
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文