Assembly-wide / root-level styles in WPF class library

后端 未结 7 1989
夕颜
夕颜 2021-01-30 06:28

I have a C# (2008/.NET 3.5) class library assembly that supports WPF (based on this article).
I\'ve created several windows, and am now attempting to create a common style

7条回答
  •  粉色の甜心
    2021-01-30 07:16

    if you load it in Window.Resource, the dictionary is only available for the children of that window. You need to have it available for the window and its children.

    Try loading it in your app.xaml file. That should make it an application level resource, not a window-level resource.

提交回复
热议问题