将Caliburn.Micro与WP7中的Expression Blend一起使用 [英] Using Caliburn.Micro with Expression Blend in WP7

查看:62
本文介绍了将Caliburn.Micro与WP7中的Expression Blend一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是使用Caliburn.Micro作为MVVM框架创建了一个WP7项目,但我不确定使该项目与Expression Blend或Visual Studio设计器一起正常工作的最佳方法。

I just creating a little WP7 project using Caliburn.Micro as the MVVM framework, but I'm not sure of the best way of getting the project to work well with either Expression Blend or the Visual Studio designer.

人们如何使用Calibun.Micro进行设计?我是否最好忽略这些约定并使用传统的绑定机制,以便Blend可以理解这些视图?有什么方法可以将Caliburn绑定逻辑导入到Blend中,以便它可以识别约定?

How are people doing their design with Calibun.Micro? Am I best to ignore the conventions and use traditional binding mechanics so that Blend will understand the views? Is there any way to import Caliburn binding logic into Blend so that it recognises the conventions?

此刻,我所有的视图都显示为空控件,因此我需要运行应用程序以了解事物的外观。我认为有一种更好的方法会丢失。

At the moment all of my views appear as empty controls and I need to run the application to get any idea of what things look like. I assume there is a better way that I'm missing.

推荐答案

**更新:带有约定的设计数据现已内置到CM。
http://caliburnmicro.codeplex.com/SourceControl/changeset/changes/c5cac07cd755
http://mnajder.blogspot.com/2011/09/design-time-support-for-caliburnmicro.html

**Update: Design data with conventions is now built in to CM. http://caliburnmicro.codeplex.com/SourceControl/changeset/changes/c5cac07cd755 http://mnajder.blogspot.com/2011/09/design-time-support-for-caliburnmicro.html

我有一直使用MVVM Light的ViewModelLocator,并添加了IsInDesignMode属性来扩展CM的Screen类。 CM当然会忽略任何绑定设置的约定,但是对于拥有模拟数据的设计师来说,这是一笔不小的交易。

I have been using the ViewModelLocator from MVVM Light and extending CM's Screen class adding the IsInDesignMode property. CM of course ignores conventions with any bindings set but its decent trade for a designer having mocked data.

有什么方法可以将Caliburn绑定逻辑导入Blend以便认识到约定?

"Is there any way to import Caliburn binding logic into Blend so that it recognises the conventions?"

此处


不幸的是,您知道所有需要了解的
。我试图向Blend团队解释这些
情况,以便我们
可以在产品中获得适当的可扩展性挂钩
,以使约定
在设计时起作用,但是他们只是
很难理解。他们
不跟进事情,他们是
内部非常封闭的团体,或者
微软。 Silverlight和WPF MVP
不一定可以直接访问
。您必须是Blend MVP。
这些人通常主要是设计师,很少有人了解更大的
开发甚至
公约可以为简单的
项目带来的好处的设计师。这样做可能会
,但这将需要
的大量痛苦工作,而
可能会在下一个Blend版本的
中中断。尚无很好的
扩展API
。然后,还有使其在Visual
Studio中工作的
问题。目前,我没有
有时间或耐心尝试
提出一些建议。这是一个很棒的
地方,来自
社区的贡献将使
产生巨大的差异。我会尽可能地烦扰
Blend团队。但是,我的
猜测是他们还有其他
的问题。

Unfortunately, you know all there is to know. I've tried to explain these scenarios to the Blend team so that we can get the proper extensibility hooks in the product to make conventions work at design-time, but they just have a hard time understanding. They don't follow up on things and they are a very "closed" group inside or Microsoft. Silverlight and WPF MVPs don't necessarily have direct access to them. You have to be a Blend MVP. Those tend to be mostly designers and very few who understand larger scale development or even the benefits that conventions can give on simple projects. Doing this might be possible, but it would require a lot of very painful work and would probably break with the next release of Blend. The APIs for extensibility that are there are not very well documented. Then, there's also the issue of making it work in Visual Studio as well. Currently, I don't have the time or patience to try to come up with something. It's a great place where a contribution from the community would make a massive difference. I'm going to keep bugging the Blend team when I can. But, my guess is that they have other concerns.

我相信Rob会对此发表一些看法在听到的代码中。

I believe Rob talks a bit about this in this Hearding Code episode.

<一个href = http://goo.gl/bJTcX rel = nofollow>这并不是旨在显示此内容的演示,但是我在这段代码中使用了MVVM Light的ViewModelLocator CM应用程序中的一些数据。

This isn't a demo intended for showing this but I was using the ViewModelLocator from MVVM Light in this bit of code to mock some data in a CM app.

这篇关于将Caliburn.Micro与WP7中的Expression Blend一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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