dynamicresource Questions

1

I'm trying to dynamically change the Brush of a GeometryDrawing inside a DrawingBrush by setting a DynamicResource. <DrawingBrush x:Key="Vector.Close" Stretch="Uniform" Align...
Fibrinogen asked 11/9, 2020 at 18:59

2

Solved

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 differen...
Riddick asked 26/1, 2016 at 14:15

1

I'm seeing some unexpected behavior using ComponentResourceKey. The problem came up because I was using names used in the SystemColors class. Consider the following code: First I expose a Compon...
Alchemist asked 22/10, 2009 at 21:30

2

Solved

I want to bind to a resource (DynamicResource) and access properties on that resource, but is there a way to do that? (I want to visualize the default values from constructor in the xaml editor i...
Adobe asked 30/8, 2010 at 9:8

1

Solved

Note: This is a revision of an earlier design that had the limitation of not being usable in a style, negating its effectiveness quite a bit. However, this new version now works with styles, esse...
Orola asked 19/11, 2015 at 23:47

4

Solved

I have a ResourceDictionary with some images: <BitmapImage UriSource="..\Images\Bright\folder-bright.png" x:Key="FolderItemImage" /> I've create a HierarchicalTemplate f...
Marxismleninism asked 13/12, 2013 at 10:59

3

I have been trying for a day now, to no avail, to create a bunch of brushes in the theme then using them with DynamicResource in a custom control. What I did is this: create the theme generic.xam...
Orola asked 21/8, 2010 at 9:31

3

Solved

I need to use the same storyboard in several places therefore I placed the storyboard inside my Application.Resources . When I try to execute the storyboard the only problem is that I need to refer...
Flieger asked 27/6, 2011 at 16:36

4

Is there a way to define a converter when using the DynamicResource extension? Something in the lines of <RowDefinition Height="{Binding Source={DynamicResource someHeight}, Converter={StaticR...
Designed asked 26/1, 2011 at 13:58

1

I am currently working on a project where I use Caliburn to bind between View and ViewModel. In order to be able to switch between languages during runtime, I have separate resource files containin...
Blanchard asked 7/8, 2015 at 7:16

2

<Window x:Class="WpfTutorialSamples.WPF_Application.ResourceSample" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xm...
Athabaska asked 19/9, 2014 at 11:19

1

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: <TextBlock Te...
Mcnally asked 6/6, 2013 at 13:2

4

I'm trying to bind DataColumn Header to DynamicResource using following code. <Window.Resources> <sys:String x:Key="HeaderText">Header Text</sys:String> </Window.Resources&gt...
Pneumatics asked 16/3, 2009 at 21:32

5

Solved

Visual Studio 2010 | .NET/WPF 4.0 I think this might be a WPF bug, but I can't seem to find a bug report about it. To cover the possibility that I'm just missing something obvious, I turn to stack...
Spectrochemistry asked 22/7, 2013 at 14:5

1

The main menu of my program uses a ContextMenu composed of MenuItems. During the localization of my program (using Resource Dictionaries), I set a DynamicResource as the Header of each one of my Me...
Vestige asked 11/12, 2013 at 20:23

2

I want to change the color of a WPF control depending on the state of a bool, in this case the state of a checkbox. This works fine as long as I'm working with StaticResources: My control <Tex...
Howerton asked 30/9, 2011 at 11:56

2

Solved

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...
Rules asked 4/7, 2013 at 16:44

1

Solved

First the code what I was starting from: <ribbon:RibbonMenuButton IsEnabled="{Binding ForegroundIsConfigurable}" SmallImageSource="{Binding Source={StaticResource imageSource}, Path=Source, ...
Berthaberthe asked 26/3, 2013 at 9:57

1

Solved

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 t...
Millican asked 12/3, 2013 at 15:39

1

Basically, I have a UserControl that uses a DynamicResources. The application compiles and runs fine using that resource, but it's a bit annoying to see this warning message. It makes me wonder if ...

1

Solved

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 DynamicResourc...
Marissamarist asked 8/8, 2011 at 7:24

2

I´m using a markupextension for loading internationalized strings in a WPF application like this: <Button Content="{Translate MyText}"/> My markupextension is named "TranslateExtension" an...
Dipeptide asked 14/6, 2009 at 14:21

2

Solved

Is there any example which can clearly state the difference between Static and dynamic resource. I know the basic difference that Static is loaded once and gets binded at start while dynamic is loa...
Mcmahan asked 13/4, 2011 at 7:4

2

Solved

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" <UserControl x:Class="Controls.OutputPanel" xmlns="http:/...
Surrogate asked 1/3, 2011 at 11:54

1

Solved

Are dynamic resources truly dynamic? If I define a DynamicResource, I realise that an expression is created (where?) that is not translated into a resource until runtime, however, What I do not und...
Alcaide asked 15/4, 2010 at 20:44

© 2022 - 2024 — McMap. All rights reserved.