NoesisGUI
 

🔹 ResourceDictionary Class

namespace Noesis | MSDN

Provides a hash table implementation that contains resources used by the UI.

ResourceDictionaries are implicitly created when using the Resources property of tree elements. But a resource dictionary can also be declared as a single XAML file for later runtime load or for merging it into the Application or a FrameworkElement.

<ResourceDictionary
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <SolidColorBrush x:Key="NormalBrush" Color="Silver"/>
  <Style TargetType="Button">
    <Setter Property="FontSize" Value="20"/>
    <Setter Property="Background" Value="Crimson"/>
  </Style>
</ResourceDictionary>

Inheritance Hierarchy

• ResourceDictionary

📚 Class Hierarchy Index

Properties

Name Description
◆ MergedDictionaries Gets the collection of merged dictionaries
◆ Source Get or set the source file for this dictionary

◆ Dependency Property   ◆ Reflection Property


Attached Properties

ResourceDictionary has no attached properties

Methods

Name Description
◆ Add(const char*, BaseComponent*) Adds an element with the provided key and value to the dictionary
◆ AllowFindInParentDictionary() Allows this dictionary to search for resources in sibling dictionaries when merged into a parent dictionary. Used internally by Studio to correctly solve Global Resources
◆ Clear() Removes all elements from the dictionary
◆ Contains(const char*) Determines whether the dictionary contains an element with the specified key
◆ Count() Returns the number of entries of the base dictionary (excluding merged dictionaries)
◆ Find(const char*, Ptr<BaseComponent>&) Looks for an element in the dictionary. Returns true if element was found, false otherwise
◆ Get(const char*) Gets the value stored for the specified key
◆ HasResourcesDefined() Indicates if this dictionary or any of the merged dictionaries contains a resource
◆ IsReadOnly() Indicates if this dictionary is read-only
◆ Remove(const char*) Removes the element with the specified key from the dictionary
◆ Set(const char*, BaseComponent*) Sets the element with the specified key

From BaseDictionary

Name Description
◆ RemoveDictionaryChangedListeners() Removes listeners subscribed to DictionaryChanged event

Events

ResourceDictionary has no events

 
© 2017 Noesis Technologies