简体   繁体   English

在WPF中使用Codeplex模板

[英]Using Codeplex templates in WPF

I had created a basic application using Visual studio 2010. To modify the existing look and for improving GUI, I tried browsing for templates and found Codeplex. 我使用Visual Studio 2010创建了一个基本应用程序。为修改现有外观并改善GUI,我尝试浏览模板并找到Codeplex。 And then downloaded an exe & installed it. 然后下载一个exe并安装它。

No clue regarding what should be done after that! 关于此后该怎么办没有任何线索! checked out the visual studio project settings. 签出Visual Studio项目设置。 Nothing regarding templates. 与模板无关。

I am new to WPF. 我是WPF的新手。 Any ideas how to proceed ? 任何想法如何进行? There are many articles around stating that the themes can be found in codeplex but none about how 2 use it. 周围有很多文章指出主题可以在codeplex中找到,但没有关于2如何使用的主题。

Do you mean the WPF Themes? 您是说WPF主题吗? Please check the link http://wpf.codeplex.com/wikipage?title=WPF%20Themes 请检查链接http://wpf.codeplex.com/wikipage?title=WPF%20Themes

OK Guys, Lets take this one step at a time. 好的,让我们一次迈出这一步。 After crunching hours, I did apply the Codeplex template to my project. 在忙碌的几个小时之后,我确实将Codeplex模板应用于了我的项目。

(This may sound simple for others.(anyways for the sake of beginners like me!) (这对其他人来说可能听起来很简单。(无论如何,为了像我这样的初学者!)

First, 第一,

1) Right click the references tab (found under the solution explorer of your project). 1)右键单击“引用”选项卡(位于项目的解决方案资源管理器下)。

2) Click "Add Reference" and navigate to the 'Browse' tab and choose WPFToolkit.dll 2)单击“添加引用”,然后导航到“浏览”选项卡,然后选择WPFToolkit.dll

3) This is the trickiest part. 3)这是最棘手的部分。 For this, download the WPFToolKit.msi from codeplex 1 Link . 为此,请从codeplex 1 Link下载WPFToolKit.msi。

4) You will need .net 3.5 sp1 framework for this.Refer to my answer at 1 Warning here 4)您将需要.net 3.5 sp1框架。请参阅我的答案在1警告此处

5) After successful installation, you will be shown nothing except the installation status. 5)成功安装后,除安装状态外,您将一无所获。

6) So now, for the WPFTookKit.dll browse your program files. 6)现在,对于WPFTookKit.dll,浏览您的程序文件。 For me, it was found in "C:\\Program Files\\WPF Toolkit\\v3.5.50211.1" 对我来说,它位于“ C:\\ Program Files \\ WPF Toolkit \\ v3.5.50211.1”中

7) After this has been done, follow the next step of adding the xaml file to your project. 7)完成此操作后,请执行将xaml文件添加到项目中的下一步。

8) As Oleg said, right-click on the project in the Solution Explorer, choose Add --> Existing File and select the appropriate .xaml file (In my case I used a expression dark template from here ) 8)如Oleg所说,在解决方案资源管理器中的项目上单击鼠标右键,选择Add-> Existing File并选择适当的.xaml文件(在我的情况下,我从此处使用了表达式dark模板)

9)Now double click the App.XAML file and under add the following entry [] without '[' and ']'. 9)现在双击App.XAML文件,并在下面添加不带[[和]]的条目[]。

10) Refresh MAINWINDOW.XAML and by this time, your theme should have been applied. 10)刷新MAINWINDOW.XAML,此时您的主题应该已经应用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM