摘要: “Logical resources may be of various types, such as brushes, geometries, styles, and templates.Placing all those resources in a single file such as App.xaml hinders maintainability. A betterapproach would be to separate resources of different types (or based on some other criteria) totheir own files 阅读全文
posted @ 2013-07-02 22:03 DebugLZQ 阅读(14945) 评论(8) 推荐(3) 编辑
摘要: “Sometimes binary resources are defined in one assembly (typically a class library), but areneeded in another assembly (another class library or an executable). WPF provides a uniformand consistent way of accessing these resources using the pack URI scheme.”假如我们定义一个WPF User Control Library,并在其中添加一张图 阅读全文
posted @ 2013-07-02 13:15 DebugLZQ 阅读(2862) 评论(0) 推荐(1) 编辑
摘要: WPF中的Binary Resource(二进制资源)是相对于前面所说的Logical resource(逻辑资源)而说的,一般指Image、XML文件等。注意:这里说的是Resource"资源",和Content"内容"是不同的。1.Content VS Resource一般我们向工程中添加一个二进制的资源,如图片。我们设置它的属性,设置成资源和内容是不同的!简单的说下两者的区别:“When the Build Action is set to Content (as in the jellyfish example), the resource is 阅读全文
posted @ 2013-07-02 07:30 DebugLZQ 阅读(2010) 评论(2) 推荐(2) 编辑