Questions tagged [mergeddictionaries]
Merged Resource Dictionaries are used to define the resources portion of WPF applications, outside the compiled XAML app. Do not use this tag for questions related to merging dictionaries, for which, you can use the [dictionary] tag instead.
65
questions
0
votes
2
answers
37
views
python Count Column
I'm trying to create new column with the count of each attribute (Number) but it's given me the total count of row as shown below
POM = pd.read_excel('POM.xlsx' , sheet_name='Sheet1')
POM['Merged']=...
0
votes
2
answers
51
views
Combining dictionaries from two lists of dictionaries
I have two lists that are full of dictionaries.
l1 = l1 = [{'sku': '1122564', 'mfg': 'KANCA', 'mfgPartNumber': 'KC6247VMV2', 'import productNo': 'KANCA-KC6247VMV2', 'dept': 11, 'class': 30},
{'...
1
vote
1
answer
152
views
Merged ResourceDictionary causes a null reference exception
In Xamarin.Forms I get a runtime Exception when I use a Merged ResourceDictionary in another ResourceDirectory when applied to a FlyoutHeader Template.
When I remove the Merged Dictionary and add the ...
0
votes
0
answers
26
views
How can I append two keys from two dictionaries into a CSV file?
I'm currently collecting tweets with the Twitter API and want to store them into a CSV file. I want to append key attributes from two dictionaries to the respective user. The data dictionary includes ...
0
votes
1
answer
296
views
WinUI 3 (UWP) Dynamic Theming
In Xamarin Forms, Styles and Colors can be changed dynamically by loading and unloading Resource Dictionaries from the Application.Current.Resources.MergedDictionaries. Can the same thing be done in ...
0
votes
1
answer
118
views
Wpf ResourceDictionary for Style and Brushes and how to MergedDictionaries
I hope someone can clarify the situation I have below.
I have a simple CustomControl style based on a Button in a ResourceDictionary named SHButtonStyle.xaml
<Style TargetType="{x:Type local:...
3
votes
2
answers
556
views
Merge two keys of a single dictionary in python
For a dictionary "a", with the keys "x, y and z" containing integer values.
What is the most efficient way to produce a joint list if I want to merge two keys in the dictionary (...
0
votes
1
answer
132
views
How can I merge two ResourceDictionary objects into Application.Current.Resources using C# instead of XAML?
Here is the situation that I have. Two resource dictionaries labeled for this example Theme1 and Theme2
public class Theme1 : ResourceDictionary
{
protected Theme1()
{
Add(nameof(...
2
votes
1
answer
490
views
Visual Studio 2019 WPF designer won't display custom controls
In a WPF (.NET Core) application project I have defined a folder to contain all custom controls (both class definitions and UI style .xaml files, each custom control has a pair of these files). When ...
1
vote
2
answers
832
views
How do I merge two dictionaries keeping max value against common keys?
I have two dictionary that look like:
{'r': 2, 'e': 4, 'h': 2, 'k': 4}
and
{'r': 2, 'e': 5, 'y': 2, 'h': 2}
how do I get a dictionary that has all the keys but incase there are keys in both initial ...
1
vote
2
answers
41
views
How join/merge/update JSON dictionaries without overwriting data
I have a JSON list of dictionaries like so:
data = [{
"title": "Bullitt",
"release_year": "1968",
"locations": "1153-57 Taylor Street&...
0
votes
1
answer
56
views
Simplify resource dictionary addressing in wpf
Let me describe the problem this way
I have created a custom control and Users can use custom control in this way
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/...
0
votes
1
answer
49
views
Merging two Dictionaries without overwrite values in the nested one
I tried to update main dictionary with every new one in the loop, but every time it overwrite values inside the nested dictionary.
I mean I want smth like this:
{'Barbour': {1900: 73041, 1910: 895427, ...
0
votes
3
answers
65
views
Python Dictionary output issues
I am new to python and this forum. Online learning isn't working for me so I can't just go to a tutor. It could be something minor I am forgetting. I welcome any assistance you can give me.
I am ...
1
vote
2
answers
178
views
Merging lists and dicts in Python with fromkeys() method
I am very new in Python and I am confused in using .formkeys() method with lists.
Here's my code below:
# dictionary exercise 4: Initialize dictionary with default values
employees = ['Kelly', '...
0
votes
2
answers
145
views
How to merge arbitrary number of dictionaries and concatenating values with common keys
Suppose you have the following dictionaries
dict1 = {'a': 'a'}
dict2 = {'a':'b', 'c':'d' , 'f':'w', 'r':' not unique' }
dict3 = {'a': 'c', 'c':'e'}
dict4 = {'a': 'd', 'c':'e', 'f':'r'}
dict5 = {'r': '...
0
votes
1
answer
72
views
Merging the dictionaries [duplicate]
d1 = {'Adam Smith':'A', 'Judy Paxton':'B+'}
d2 = {'Mary Louis':'A', 'Patrick White':'C'}
d3 = {}
for item in (d1, d2):
d3.update(item)
print(d3)
In this Python Code, the task is to merge the ...
3
votes
2
answers
261
views
Merge several dictionaries creating array on different values
So I have a list with several dictionaries, they all have the same keys. Some dictionaries are the same but one value is different. How could I merge them into 1 dictionary having that different ...
0
votes
3
answers
56
views
Can I insert dictionaries with values list in a loop?
key, values
(0, 1)
(0, 2)
(0, 6)
(0, 7)
(1, 0)
(1, 2)
(2, 1)
(2, 0)
(3, 4)
(3, 5)
(4, 3)
(5, 3)
(6, 0)
(7, 0)
I have problem with my python code. I want to insert data in the dictionaries in python. ...
2
votes
4
answers
70
views
Style of TextBox causes exception when loading control in other assembly
I have created an assembly for reusable controls (amongst other things). In this assembly, there is a Themes/Generic.xaml file that is used for custom control styles.
I would like to implement the ...
0
votes
0
answers
66
views
Updating ResourceDictionary using Resources.BeginInit()
I am updating Resources (merging dictionaries and changing ResourceKey values) in code behind. I read somewhere that I should write all ResourceDictionary changes between these lines Resources....
6
votes
3
answers
7k
views
XAML - Using fonts from resource dictionary from another assembly
I am building an application that uses ResourceDictionaries from another assembilies and I'm having problems with using fonts.
There is an assembly named MyFontAssembly that stores fonts along with ...
0
votes
1
answer
605
views
Avoid to refer styles in all pages - Xamarin.Forms
I'm working on a Xamarin Forms app for mobile cross platform.
I found how to apply styles to my pages and controls in this way:
Styles/HeaderStyle.xaml
<?xml version="1.0" encoding="UTF-8"?>
&...
0
votes
2
answers
392
views
WPF - language changes only in MainWindow?
I've programmed a choose-language option in my project, using MergedDictionaries and project's settings. The issue is the language changes successfully only in my MainWindow, and not in other Windows ...
6
votes
1
answer
3k
views
Type reference cannot find type named '{clr-namespace:xxx}ClassName on MergedDictionary
I'm received the exception Type reference cannot find type named '{clr-namespace:Dashboard.View}DashBoardColors at runtime.
I have a static class with my colors:
namespace Dashboard.View
{
...
0
votes
1
answer
163
views
cannot derive from sealed type 'ResourceDictionary',Xamarin.forms
I want to make a Resourcedictionary that will then used in another page(Will call mergedwith to add it to the resourceDictionary of a page as per this page.https://xamarinhelp.com/merged-dictionaries-...
0
votes
1
answer
1k
views
WPF Merged ResourceDictionary with resource that binds to resource in another Dictionary not working
I have created a simple project that demonstrates the issue I am having where I get the error:
'Provide value on 'System.Windows.Markup.StaticResourceHolder' threw an exception.' Line number '6' and ...
1
vote
1
answer
2k
views
The attachable property 'MergedDictionaries' was not found in type 'ResourceDictionary'
<Application x:Class="mahaapswpf.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
...
2
votes
0
answers
167
views
SharedResourceDiationary not loaded in WPF Designer
I'm trying to implement the SharedResourceDictionary from here:
http://www.wpftutorial.net/MergedDictionaryPerformance.html
But I can't manage to let the Designer show the correct styles. (not using ...
0
votes
1
answer
180
views
Loading resources to imported assembly
I have developed to applications a scheduler program and a library administration program.
The library admnistration needs some of the same features in the scheduler program so published the scheduler ...
0
votes
1
answer
103
views
Why is this MergedDictionary entry causing an exception?
We have a control library which we reference in our main application. In it, we decided to split up our Generic.xaml into type-specific resources such as Brushes.xaml, Colors.xaml, etc., then we'd ...
0
votes
1
answer
46
views
Use one style but not both together in WPF
I'm preparing the 511 certification, and one of the question I didn't understand was this one :
You are developing a Windows Presentation Foundation (WPF) application.
Two styles, Blue and green, ...
1
vote
1
answer
734
views
Trouble creating nested merged dictionaries using SharedResourceDictionary
I have an assembly called Atelis.Base.Wpf.Resources. It is a DLL that holds resource dictionaries.
Within this assembly I have defined a SharedResourceDictionary:
namespace Atelis.Base.Wpf.Resources
...
4
votes
1
answer
7k
views
Merged dictionaries in the App.xaml
I have a bunch of Xaml vector icons inside a separated .xaml. I load them inside my window using this directive:
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary....
3
votes
1
answer
1k
views
Nested Resource Dictionary in separate library
My question is very similar to this one
I have a solution with a number of projects. The are two that are relevant: a class library that contains a WPF window and a project with all the WPF styles in ...
1
vote
1
answer
299
views
Invalid characters in Merged ResourceDictionary
I have the following resource dictionary
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<...
1
vote
1
answer
423
views
WPF - Style behavior - Global style that disappear
strong textI have a style defined into a MergedDictionary (see below). It does add cursor style to all splitter bar in my app. It works perfectly... Until...
The problem is that style disappear ...
16
votes
1
answer
19k
views
Merged dictionaries and local resources
I have a Styles.xaml that groups many ResourceDictionarys inside a MergedDictionary.
I imported Styles.xaml in my UserControl.Resources
<UserControl.Resources>
<ResourceDictionary ...
0
votes
1
answer
262
views
WPF: Switching window styles
I have a program that has some buttons, one of them is used to switch "Themes".
There are two themes, one is the normal Windows theme and the other is called Style2.
This is how I tried the switching
...
6
votes
1
answer
4k
views
MergedDictionaries in XAML rewritten to code
Is
this XAML code in App.xaml:
<Application x:Class="Company.Product.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/...
1
vote
1
answer
603
views
Add / Clear MergedDictionaries from code behind in windows 8 app
I am trying to change the MergedDictionaries from code behind in windows 8 application. My App.xaml looks like below,
<Application.Resources>
<ResourceDictionary>
<...
1
vote
1
answer
3k
views
MergedDictionaries nightmare
I'm trying to use a WPF Template and I'm supposed to include this in my App.xaml, but I get "Nested properties are not supported: ResourceDictionaries.MergedDictionaries" error and "The attachable ...
1
vote
0
answers
123
views
WPF: Merger Dictionaries source in separate class
In my application I am keeping all my strings in separate library.
Also I would like to include there the Pack URI for my XAML Merged Dictionaries like this:
<ResourceDictionary>
<...
4
votes
1
answer
422
views
ResourceDictionary in MergedDictionaries Source causing VS 2012 Designer not to load
the line ResourceDictionary Source="..." ist underlined and the VS designer throws an Exception. Everything was working in VS 2008
<ResourceDictionary>
<ResourceDictionary....
-1
votes
1
answer
229
views
I get a XamlParseException when i try to load a merged ResourceDictionary filled with DataTemplates
In my Windows Phone 7.5 application i want to have a merged ResourceDictionary filled with DataTemplates. To achieve this, i created a file called "DataTemplates.xaml" and filled it with DataTemplates ...
3
votes
1
answer
3k
views
winrt xaml merged resources
I need to separate application styles to several xaml files.
But I also need to define some shared values like
<x:Double x:Key="SharedValue">100</x:Double>
in single file for use this ...
2
votes
2
answers
2k
views
Unable to find MergedDictionaries in app.xaml
I have created a WPF application (named "Ferhad.Wpf"). Then I added two class libraries with names "Ferhad.Wpf.Core" and "Ferhad.Wpf.SystemStyles" to the solution.
There is only "Resources.xaml" in "...
0
votes
1
answer
428
views
XAML resource handling slowly driving me crazy
I am working with loose XAMLs (Build Action None, but always copy to output directory). Also i have a "root" xaml that is a resource dictionary which references some merged dictionaries which are ...
0
votes
1
answer
1k
views
Merge resources into app.xaml?
Targeting .NET Framework 4.0.
I have a UserControl (usercontrol.xaml) with some resources that I would like to be accessible from the application's resources (app.xaml). (My UserControl is ...
3
votes
2
answers
952
views
WP7 Mango ResouceDictionary MergedDictionaries
i am having problem with ResourceDictionary in WP7 Mango.
Most of what I could find on the internet is as simple as this:
1) Xaml file with body:
<ResourceDictionary
xmlns="http://schemas....