Silverlight 和 Blend - 如何以编程方式访问示例数据?

发布于 2024-08-17 07:07:58 字数 138 浏览 5 评论 0原文

我在 Blend 中为 Silverlight 应用程序创建了一个用户界面。该应用程序当前正在使用我在 Blend 中创建的一些示例数据。我需要在运行时处理这个示例数据。

如何访问运行时在 Blend 中创建的示例数据?

谢谢你!

I have created a user interface for my Silverlight application in Blend. This application is currently using some sample data that I created within Blend. I need to do something with this sample data at runtime.

How do I access sample data that has been created in Blend at runtime?

Thank you!

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

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

发布评论

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

评论(1

不忘初心 2024-08-24 07:07:58

通常,此示例数据会作为应用程序资源添加,并以 SampleDataSource 作为键。这意味着您可以像这样访问它:

((SampleDataSource)Application.Current.Resources["SampleDataSource"]).Collection

请注意,SampleDataSource 类位于 Expression.Blend.SampleData.SampleDataSource 命名空间中,因此可能需要使用。

Typically this sample data is added as application resource with SampleDataSource as key. This means that you can access it like this:

((SampleDataSource)Application.Current.Resources["SampleDataSource"]).Collection

Note that SampleDataSource class is located in Expression.Blend.SampleData.SampleDataSource namespace so a using may be needed.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文