Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 10 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(4)
就我个人而言,我认为 Silverlight“样式和模板”的整个解释方式是荒谬的。我们谈论这两个属性就像火箭科学之类的。
人们对 Silverlight 的“样式和模板”进行了大肆宣传,而实际上它是一个非常简单易懂的主题。
了解 Silverlight UI 工作原理的最佳方式是通过 Silverlight UI 设计器:Expression Blend 和 Visual Studio 2010 Silverlight 设计器。
然而 Blend 更适合这个主题。
您想知道什么是属性上一个控件吗?打开 Expression Blend 并试用它。阅读书籍、观看网络广播甚至浏览 MSDN 都无法替代真实体验。
因此,下载表达式混合,启动一个新的Silverlight项目,在设计表面上放置一个控件并开始摆弄它。这是您获得现实世界经验的好方法。
此外,Microsoft 为其 Silverlight 控件提供了以下 2 个示例应用程序:
1) Silverlight Framework 控件 - http://silverlight.net/content/samples/sl2/silverlightcontrols/run/default.html
2) Silverlight SDK + Silverlight Toolkit 控件 - http://silverlight.net/samples/sl3/toolkitcontrolsamples/run/default.html
很好的问题。关于样式、模板和 VisualStateManager 有很多可以说的。但是,我不会直接说出来,而是再次向您指出 Blend。
请观看以下四个 VisualStateManager “我该怎么办?”视频由史蒂夫·怀特拍摄。当我尝试用 VSM 和模板来思考时,这些对我帮助很大。
Personally, I think that the whole way Silverlight "Styling and templating" is being explained is ludicrous. We're talking about these 2 properties like it's rocket science or something.
There's a massive hype around Silverlight "Styling and templating" when it is in fact a very easy and approachable topic.
The best way you could possibly understand how Silverlight UI works is through the Silverlight UI Designers: Expression Blend and Visual Studio 2010 Silverlight Designer.
Blend however is much more accommodating to this topic.
You want to know what a property on a control does? Open up Expression Blend and play around with it. Reading a book, watching a webcast or even skimming through MSDN is no substitue for real exprience.
So, download expression blend, start a new Silverlight project, place a control on the design surface and start fiddling around with it. It's a good way you'll gain real world experience.
Also, Microsoft ships the 2 following sample apps for it's Silverlight controls:
1) Silverlight Framework controls - http://silverlight.net/content/samples/sl2/silverlightcontrols/run/default.html
2) Silverlight SDK + Silverlight Toolkit controls - http://silverlight.net/samples/sl3/toolkitcontrolsamples/run/default.html
Excellent question. There's a lot that can be said about Styling, Templating and the VisualStateManager. But, Instead of saying it - I'll point you again to Blend.
Please watch theese four following VisualStateManager "How Do I?" videos by Steve White. These helped me tremendously when I tried to wrap my brain around VSM and templating.
我一直在使用 silverlight.net 视频,然后是 MSDN 站点来了解不同控件的属性。当然,请观看 Silverlight.net 上的主题视频。它们真的很有用。
需要注意的一件事...如果该控件不是标准控件集的一部分(IE 它们仍然没有像 datagird 控件一样直接内置),那么当您将它们设置为主题时,您将不会有任何预置-“编辑当前模板”选项中确定的值。你必须去找一个他们的默认主题的例子,复制进去然后搞乱它。
What I've been using are the silverlight.net videos and then the MSDN site for properties of different controls. Watch the themeing videos on Silverlight.net for sure though. They're really useful.
One thing to watch out for... if the control is not a part of the standard set of controls (IE they're still not built directly in like the datagird control) when you go to theme them, you will not have any pre-determined values in the "edit current template" option. You have to go and find an example of their default theme, copy in and then mess with that.
我发现 有关 Silverlight 3 控件样式的 MSDN 文档非常好。
I find the MSDN documentation on Silverlight 3 control styling quite good.
我刚刚发布了 Silverlight 4 beta 的知识共享样式集 - 您可以下载这些样式并使用它们/查看 xaml 以了解样式的工作原理
http://www.blackspike.com/site/silverlight/free-silverlight-4-beta-skin
I've just released a creative commons set of styles for Silverlight 4 beta - you can download those and play with them/look through the xaml to get an idea of how styles work
http://www.blackspike.com/site/silverlight/free-silverlight-4-beta-skin