R
Rolf Welskes
Hello,
because there are no managed news group for window presentation foundation
and one
has told me I can use this, here my problem:
I have one resource-definition,
for example in an own xaml file, a large number of objects defined as
resources.
Now I need these resources (objects) in many windows, controls, etc. in one
DLL.
I cannot do the resources on Application-Level, because they should not be
availabe in a large program - only in the one DLL.
So I have tried the following:
I have defined the resources in an own xaml file.
Now I have used ResourceDictionary.MergedDictionies and in all files so
added the resources.
This works.
BUT: now I have seen, that the resources are re-constructed in all - for
example 30 windows.
Means if I have for example a Brush in resources declared as:
<SolidColorBrush Color="Red", x:Key="myRedBrush"/>
and use MergedDictionay in 30 window.xaml-files, I have 30 Brushes, not only
one.
Simple would be to put this resources in Application then it would be
availabe at all places unique.
But this is not possible if you have a large Application of hundrets of
parts (DLLs).
So is there a solution to define reources one time, use it at many places,
for example in 30 window.xaml-files,
but the resources are unique, means each object of the resources is
constructed only one time and used many times.
Thank you for any help.
Rolf Welskes
because there are no managed news group for window presentation foundation
and one
has told me I can use this, here my problem:
I have one resource-definition,
for example in an own xaml file, a large number of objects defined as
resources.
Now I need these resources (objects) in many windows, controls, etc. in one
DLL.
I cannot do the resources on Application-Level, because they should not be
availabe in a large program - only in the one DLL.
So I have tried the following:
I have defined the resources in an own xaml file.
Now I have used ResourceDictionary.MergedDictionies and in all files so
added the resources.
This works.
BUT: now I have seen, that the resources are re-constructed in all - for
example 30 windows.
Means if I have for example a Brush in resources declared as:
<SolidColorBrush Color="Red", x:Key="myRedBrush"/>
and use MergedDictionay in 30 window.xaml-files, I have 30 Brushes, not only
one.
Simple would be to put this resources in Application then it would be
availabe at all places unique.
But this is not possible if you have a large Application of hundrets of
parts (DLLs).
So is there a solution to define reources one time, use it at many places,
for example in 30 window.xaml-files,
but the resources are unique, means each object of the resources is
constructed only one time and used many times.
Thank you for any help.
Rolf Welskes