DynamicResource is a XAML mechanism allowing the resources to be resolved during application runtime. It also allows changing the resources in such way, that each user of these resources will be notified and allowed to react accordingly to the change.
Questions tagged [dynamicresource]
134 questions
6
votes
2 answers
Why can't I use DynamicResource with DataGridColumn.CellStyle
So, for example I have some MVVM WPF application with simple model:
public class MyObject
{
public string F1 { get; set; }
public string F2 { get; set; }
}
and simple view model that creates 3 rows:
public class MyViewModel
{
public…

Envilogger
- 300
- 2
- 8
6
votes
1 answer
Is it possible to use a DynamicResource in a MultiBinding at all?
In this case I am looking to use strings declared in a resource dictionary as part of a binding on a Text property. Binding just a single dynamic resource string is not a problem:
But you quickly…

slugster
- 49,403
- 14
- 95
- 145
6
votes
1 answer
Dynamic binding to a "Path" of the resource
First the code what I was starting from:

Em1
- 1,077
- 18
- 38
6
votes
1 answer
Binding Setter value to DynamicResource
I'm creating triggers in code behind and I'm attempting to bind the value of a setter to a dynamic resource created in the code behind as well so I can update the resource whenever and still have the value of the setter updated. I'm as far as…

flamebaud
- 978
- 1
- 9
- 26
5
votes
1 answer
How does ResourceDictionary change result in DynamicResource reevaluation?
If Resources dictionary is not observable, how does DynamicResource reference work?
Do the Add / Remove methods of the resource dictionary have internal code that kind of "polls" all DynamicResource references and refreshes them when they are…

WPF-it
- 19,625
- 8
- 55
- 71
5
votes
1 answer
Create alias color definitions for multiple dynamic skin dictionaries using WPF
I am trying to set up a theme framework in a large WPF application. Currently the solution we have found is to create separate .xaml files for each color palette like so:
Aqua

Z Lang
- 73
- 3
5
votes
1 answer
DynamicResource not working, but StaticResource does?
Here is the scenario:
1) Open Visual Studio 2008, create new project...
2) Select WPF Custom Control Library as the project type
3) Open the Generic.xaml resource dictionary located in the Themes folder
4) Add a simple brush such as:
<…

Max
- 61
- 2
4
votes
1 answer
(WPF) How to set value of a sys:Double to SystemFonts.MessageFontSize from ResourceDictionary?
Scenario:
I want to use 3 standard font size for my WPF application : BigFontSize, NormalFontSize, and SmallFontSize. These are double values and they are defined in resource dictionary as (where sys is appropriately defined):

mg007
- 2,888
- 24
- 29
3
votes
1 answer
DynamicResources fail to load in a programmatically created control
I have a WPF (3.5) application using Prism to programmatically instantiate a number of views and then add them to a region. The problem I am seeing is that styles inside the view that are applied as DynamicResources are not being applied the first…

Dan Forsyth
- 136
- 1
- 5
3
votes
1 answer
Images in .ico as DynamicResource
Situation looks like that:
I have many icons in application and they are used in few different sizes.
I use icons as DynamicResource for example like that:

Marta
- 2,857
- 13
- 46
- 67
3
votes
3 answers
Create your own system colors
Basically, how can I create my own set of Colors in a static class or the such so that I can do something like this:
What exists:
What I want:

michael
- 14,844
- 28
- 89
- 177
3
votes
2 answers
Set Style for user control
I am trying to set a style for my user control. The UserControl is in a project "Controls" and the theme is in a project "MainProject"

Eamonn McEvoy
- 8,876
- 14
- 53
- 83
3
votes
1 answer
3
votes
2 answers
XAML Label Text: Binding + DynamicResource (String Format?)
For Xamarin.Forms - XAML files:
is there a way to bind the Text Property (in XAML) of a Label to a Binding + DynamicResource? Maybe with string format?
for example I tried something like this:
3
votes
4 answers
TextBlock TextWrapping Wrap and NoWrap combined and Text through DynamicResource
I have got multiple TextBlocks whose Text is inserted through DynamicResource. They are all set to TextWrapping="Wrap". But inside those Text-strings I have words which are not allowed to be split up. Those words must be kept as a whole word.
With…

CR500
- 41
- 6