WPF 主题窗口控件以匹配 Telerik 的控件
我们有一个项目主要使用Telerik WPF控件。不幸的是,某些控件(主要是选项卡控件)存在一些显示停止错误,这意味着我们需要删除等效的窗口。无论如何,有没有办法让 Windows 控件的样式像 Telerik 控件一样,因为目前它们根本不匹配。我被告知你可以这样做,但在网上找不到任何相关信息。
提前致谢
We have a project that mainly uses Telerik WPF controls. Unfortunately there are some show stopper bugs in some of the controls (mainly the tab control) that means we needed to drop the windows equivalent in instead. Is there anyway to get the windows controls to style like the telerik ones as currently they don't match at all. I have been told you can do this but cannot find anything on-line about it.
Thanks.In.Advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好的,这个问题已经被“回答”了,但我也发现很难找到任何信息,所以对于那些遵循以下内容的人:
设置 Telerik 控件的主题很容易,例如,
但您还必须做的是创建一个为所有 Windows 控件设置主题的资源文件,例如
然后您可以通过在 app.xaml 中放置一行将其添加到应用程序的资源中:
或通过在代码中添加它:
显然,您可以为每个主题创建一个文件并使用 case 语句,以便用户可以从菜单中为应用程序设置皮肤。
希望这有帮助!
OK, this question has already been "answered", but I also found it incredibly hard to find any information, so for those who follow:
Setting the theme for the Telerik controls is easy, eg
but what you also have to do is create a resources file that sets the theme for all the windows controls, eg
Then you either add it to the app's resources by placing a line in your app.xaml:
or by adding it in code:
Obviously you can then create a file for each theme and use a case statement so the user can skin the app from a menu.
Hope this helps!
答案
我设法从最初告诉我有同样问题的人那里找到了这一点。
Answer
I managed to find this out from the person that originally told me for anyone having the same problem.