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
0
votes
1 answer
What are the options to control the DynamicResource references?
Let's presume, that we want to create a UserControl and make it able to be styled by the caller.
What are the options we have in such a case?
As I understand we can use DynamicResources in xaml of the UserControl.
We can expose some DPs and bind…

EngineerSpock
- 2,575
- 4
- 35
- 57
0
votes
1 answer
Foreground issue when using with Dynamic resource
For my custom control, I am using the Dynamic resource to set the Foreground property. Initially when i run the app the Foreground property was not set to my control. When I change value dynamically Foreground was applied correctly. How can I…

Ponraja
- 570
- 2
- 6
- 17
0
votes
1 answer
Use DynamicResource to fill Color
I'd like to do something like this in my xaml ResourceDictionary:
{DynamicResource {x:Static vs_shell:EnvironmentColors.ToolWindowTextBrushKey}}
But Color accept as value only stuff like #xxxxx.
Any…

ff8mania
- 1,553
- 3
- 19
- 28
0
votes
1 answer
wpf - Context menu - Reuse static resources within dynamic resources
I have a user control with resources as below:
0
votes
2 answers
WPF Dynamic resource reference
HI
Am load a string xaml with DynamicResource assigned to a Background property. Is there a way to get the reference of the dynamic resource.
Background="{DynamicResource Color1}"
I want to get the resource reference assigned to a Dependency…

Chandimal
- 123
- 1
- 2
- 7
0
votes
1 answer
Is possible to set dynamic source of bitmap to android XML drawable
XML code
-
In code above i want to set Bitmap…

InflexCZE
- 722
- 1
- 14
- 30
0
votes
1 answer
How can I access a dynamic resource from a different assembly inside a ViewBase
I am working with a Xaml file that is a custom view derived from a ViewBase, and I would like to access a DynamicResource that is in a different assembly. I have seen that it is possible to use something like:
…

L. Desjardins
- 1,465
- 1
- 12
- 22
-1
votes
1 answer
Set Dynamic DataGridTextColumn HeaderStyle
I am trying to set a dynamic header style for my DataGrid.
I can set the ColumnHeader style for the entire Datagrid, but setting the style for a single column does not work. The style is not applied to the column.
MainWindow.xaml

Neil B
- 2,096
- 1
- 12
- 23
-1
votes
1 answer
-1
votes
1 answer
WPF Dynamic Resource from current project
I have two separate WPF projects, each with their own defined Dynamic Resources which mostly defines colors in each application. The task at hand is to include the main pages from each project in a new project. So far the projects are both included,…

Morten Kristensen
- 90
- 8
-1
votes
1 answer
Can I set dynamic Resource's property as Dynamic Resource, and when I change property resource, parent resource will change also?
I have a VisulBrush like this:

FranklinLee
- 309
- 2
- 9
-1
votes
1 answer
Datatrigger with DynamicResource works only on last item in ItemsControl
My DashBoardSimpleCountObject has 2 values: MyName and MyValue.
I use an ObservableCollection called MyData.
I want to show a picture, as long as MyValue is null.
However, the picture ("loading") is only shown at the last…

Grent
- 21
- 6
-1
votes
2 answers
Wpf dynamic resource lookup for Validation.ErrorTemplate
in my App.xaml I defined a resource for Validation.ErrorTemplate, which depends on dynamic BorderBrush resource. I intend to define unique BorderBrush in each window I have and also within different blocks inside window.