如何在mvvm wpf编码中使用自定义样式? [英] How to use customized styles in mvvm wpf coding?
问题描述
大家好,
我正在尝试使用视图和视图模型构建MVVM应用程序,在xaml.cs中没有代码。因此,我对以下内容毫无头绪。
我设计了自己的主页,按钮样式,列表和图形,我需要显示的内容与基本方式不同在datatemplates中给出。现在我的问题是如何在我正在开发的应用程序中使用我自己设计的样式?我怎么能用数据绑定来管理样式?
简单的代码可以让我理解上面的内容会有很大的帮助。
请注意:view和viewmodel应该是分开的,后面没有代码。我在网上看到的所有样本都有代码隐藏,我很不想找。
谢谢
Hello everyone,
I am trying to build MVVM app with view and view model separate with no code behind in xaml.cs. Hence, I am quite clueless with the below.
I have designed my own homepage, style of buttons, lists and graphs which I need to display looks different than basic way given in datatemplates. Now my question is how to use my own designed styles in the app i am developing? also how can I manupulate styles with data binding?
Simple code that could make me understand above would be of great great help.
Please note: view and viewmodel should be separate with no code behind. All samples i seen on net is with codebehind which I am quite not looking for.
Thank you
推荐答案
请参阅,例如, http:// www.codeproject.com/search.aspx?q=WPF+%28skins+OR+themes+OR+skin+OR+theme%29&doctypeid=1%3b14 [ ^ ]。
-SA
Please see, for example, http://www.codeproject.com/search.aspx?q=WPF+%28skins+OR+themes+OR+skin+OR+theme%29&doctypeid=1%3b14[^].
—SA
这篇关于如何在mvvm wpf编码中使用自定义样式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!