mergeddictionaries

The attachable property 'MergedDictionaries' was not found in type 'ResourceDictionary'

亡梦爱人 提交于 2020-01-25 02:52:06
问题 <Application x:Class="mahaapswpf.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" StartupUri="MainWindow.xaml"> <Application.Resources> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" /> <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" /> <ResourceDictionary Source="pack://application:

MergedDictionaries and Resource lookup

痴心易碎 提交于 2019-12-28 05:14:14
问题 i have a problem with Resource dictionaries and mergeddictionaries in general, especially when it comes to resource-lookup performance. After some performance testing i found that ResourceDictionary.get_MergedDictionaries is the call with the most hits (checked in ANTS profiler). We have around ~300 resource dictionary xamls, and a lot of them are using merged dictionary to "include" other styles. Well the get_MergedDictionaries count on one part of our application, where not much is

Silverlight Shared MergedDictionaries

℡╲_俬逩灬. 提交于 2019-12-21 02:45:19
问题 I am using Silverlight 4 and trying to share some common styles (colors, brushes). My take was to put them into a "Common.xaml" Resource Dictionary and then use it in all other Resource Dictionaries. Referencing everything like so: <Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="SampleApp.App" > <Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary

Merged dictionaries in the App.xaml

点点圈 提交于 2019-12-20 03:16:50
问题 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.MergedDictionaries> <ResourceDictionary Source="/ScreenToGif;component/Themes/IconSet.xaml"></ResourceDictionary> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </Window.Resources> I have lots of windows, so I would like to simply put this code inside the App.xaml . I'm trying this: <Application.Resources>

MergedDictionaries nightmare

旧街凉风 提交于 2019-12-14 02:38:43
问题 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 property "MergedDictionaries" was not found in type "ResourceDictionary". <Application x:Class="Unico.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" StartupUri="MainWindow.xaml"> <Application.Resources>

Proper usage of Merged Resource Dictionaries in Silverlight 3

痴心易碎 提交于 2019-12-08 17:36:30
问题 As I read: http://msdn.microsoft.com/en-us/library/cc903952(VS.95).aspx, specifically the section labeled "Forward References With a ResourceDictionary": Static resource references from within any given resource dictionary must reference a resource that has already been defined lexically before the resource reference. Forward references cannot be resolved by a static resource reference. For this reason, if you use static resource references, you must design your resource dictionary structure

XAML - Using fonts from resource dictionary from another assembly

别来无恙 提交于 2019-12-06 06:27:20
问题 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 references to them as an ResourceDictionary . The structure of it looks as follows: MyFontAssembly - FontDictionary.xaml - (stores references to fonts) - Fonts - FontA.ttf - FontB.ttf ... There is also another assembly that stores ResourceDictionaries for styling controls and it's called

Using BasedOn property with a Style defined in a different dictionary

╄→尐↘猪︶ㄣ 提交于 2019-12-06 04:23:29
问题 The application I'm working on has 2 ResourceDictionary, DefaultStyles.xaml and CustomStyles.xaml. Is it possible that a style in the CustomStyles dictionary uses a base style defined in the other dictionary? DefaultStyles.xaml: <Style x:Key="TextBlockDefaultStyle" TargetType="TextBlock"> <Setter Property="Margin" Value="4" /> </Style> CustomStyles.xaml: <Style x:Key="SectionTitleStyle" TargetType="TextBlock" BasedOn="{StaticResource TextBlockDefaultStyle}"> <Setter Property="FontSize" Value=

Using MergedDictionaries in generic.xaml in Silverlight 3

谁都会走 提交于 2019-12-04 18:54:42
问题 In WPF it was possible to organise the XAML for multiple user controls by keeping the markup in separate XAML files in the themes folder and then using MergedDictionaries to import them into generic.xaml: <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="MyFirstControl.xaml" /> <ResourceDictionary Source="MySecondControl.xaml" /> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> With the availability of the Silverlight 3 beta introducing

Nested Resource Dictionary in separate library

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-04 13:52:16
问题 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 it. Class Library with the window in Project 1 The Window's merged dictionary is something like: <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="pack://application:,,,/StyleAssembly;component/CommonStyle.xaml"/> </ResourceDictionary.MergedDictionaries> //other styles here The