WPF通用资源的位置 [英] Location of Common WPF Resources

查看:89
本文介绍了WPF通用资源的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

新手问题…

在WPF应用程序中,App.xaml中和< Application.Resources>中的内容… </Application.Resources>在整个应用程序中具有范围和可见性.

对于具有众多WPF用户控件的类插件程序集,我可以在哪里放置通用WPF资源(GeometryGroups,ControlTemplates等)?

解决方案

 

我希望我正确理解了这一点,但是如果您希望只有某些用户控件可以访问的资源区域,那么为什么不使用这些样式等来创建特定的资源字典,而要在用户控件中链接到该资源字典?

 

下面的链接将向您展示如何创建和使用它们-

 

http://www.codeproject.com/articles/35346/使用-Resource-Dictionary-in-WPF.aspx

 

希望有帮助吗?


A newbie question…

In a WPF Application, contents in App.xaml and within <Application.Resources> … </Application.Resources> have scope and visibility throughout the application.

For a class plug-in assembly with numerous WPF UserControls, where can I place the common WPF resources (GeometryGroups, ControlTemplates, etc)?

解决方案

Hi,

 

I hope I'm understanding this correctly but if you want a resource area that only certain user controls can have access to than why not create a specific resource dictionary with those styles etc and than in your user controls you link to that resource dictionary?

 

The link  below will show you how to create and use them - 

 

http://www.codeproject.com/articles/35346/Using-Resource-Dictionary-in-WPF.aspx

 

Hope that helps?


这篇关于WPF通用资源的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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