Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
1062 lines (983 sloc) 66.8 KB
<Type Name="ResourceDictionary" FullName="System.Windows.ResourceDictionary">
<TypeSignature Language="C#" Value="public class ResourceDictionary : System.Collections.IDictionary, System.ComponentModel.ISupportInitialize, System.Windows.Markup.INameScope, System.Windows.Markup.IUriContext" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi ResourceDictionary extends System.Object implements class System.Collections.ICollection, class System.Collections.IDictionary, class System.Collections.IEnumerable, class System.ComponentModel.ISupportInitialize, class System.Windows.Markup.INameScope, class System.Windows.Markup.IUriContext" />
<TypeSignature Language="DocId" Value="T:System.Windows.ResourceDictionary" />
<TypeSignature Language="VB.NET" Value="Public Class ResourceDictionary&#xA;Implements IDictionary, INameScope, ISupportInitialize, IUriContext" />
<TypeSignature Language="C++ CLI" Value="public ref class ResourceDictionary : System::Collections::IDictionary, System::ComponentModel::ISupportInitialize, System::Windows::Markup::INameScope, System::Windows::Markup::IUriContext" />
<TypeSignature Language="F#" Value="type ResourceDictionary = class&#xA; interface IDictionary&#xA; interface ICollection&#xA; interface IEnumerable&#xA; interface ISupportInitialize&#xA; interface IUriContext&#xA; interface INameScope" />
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.Collections.ICollection</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.Collections.IDictionary</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.Collections.IEnumerable</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.ComponentModel.ISupportInitialize</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.Windows.Markup.INameScope</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.Windows.Markup.IUriContext</InterfaceName>
</Interface>
</Interfaces>
<Attributes>
<Attribute>
<AttributeName>System.Windows.Localizability(System.Windows.LocalizationCategory.Ignore)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netcore-3.0">
<AttributeName>System.Windows.Markup.Ambient</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netcore-3.0">
<AttributeName>System.Windows.Markup.UsableDuringInitialization(true)</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Provides a hash table / dictionary implementation that contains WPF resources used by components and other elements of a WPF application.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The items in a <xref:System.Windows.ResourceDictionary> are not immediately processed when application code is loaded by a [!INCLUDE[TLA2#tla_xaml](~/includes/tla2sharptla-xaml-md.md)] loader. Instead, the <xref:System.Windows.ResourceDictionary> persists as an object, and the individual values are processed only when they are specifically requested.
The <xref:System.Windows.ResourceDictionary> class is not derived from <xref:System.Collections.DictionaryBase>. Instead, the <xref:System.Windows.ResourceDictionary> class implements <xref:System.Collections.IDictionary> but relies on a <xref:System.Collections.Hashtable> internally.
In [!INCLUDE[TLA#tla_xaml](~/includes/tlasharptla-xaml-md.md)], the <xref:System.Windows.ResourceDictionary> class is typically an implicit collection element that is the object element value of several `Resources` properties, when given in property element syntax. For details on implicit collections in [!INCLUDE[TLA2#tla_xaml](~/includes/tla2sharptla-xaml-md.md)], see [XAML Syntax In Detail](~/docs/framework/wpf/advanced/xaml-syntax-in-detail.md). An exception is when you want to specify a merged dictionary; for details, see [Merged Resource Dictionaries](~/docs/framework/wpf/advanced/merged-resource-dictionaries.md).
Another possible [!INCLUDE[TLA2#tla_xaml](~/includes/tla2sharptla-xaml-md.md)] usage is to declare a resource dictionary as a discrete [!INCLUDE[TLA2#tla_xaml](~/includes/tla2sharptla-xaml-md.md)] file, and either load it at run time with <xref:System.Windows.Markup.XamlReader.Load%2A> or include it in a (full-trust) project as a resource or loose file. In this case, <xref:System.Windows.ResourceDictionary> can be declared as an object element, serving as the root element of the [!INCLUDE[TLA2#tla_xaml](~/includes/tla2sharptla-xaml-md.md)]. You must map the appropriate XML namespace values (default for the [!INCLUDE[TLA2#tla_winclient](~/includes/tla2sharptla-winclient-md.md)] namespace and typically `x:` for the [!INCLUDE[TLA2#tla_xaml](~/includes/tla2sharptla-xaml-md.md)] namespace) onto the <xref:System.Windows.ResourceDictionary> element if you plan to use it as the root element. Then you can add child elements that define the resources, each with an [x:Key](~/docs/framework/xaml-services/x-key-directive.md) value.
<a name="xamlImplicitCollectionUsage_ResourceDictionary"></a>
## XAML Implicit Collection Usage
```
<object>
<object.resourcesProperty>
oneOrMoreResources
</object.resourcesProperty>
</object>
```
<a name="xamlValues_ResourceDictionary"></a>
## XAML Values
*resourcesProperty*
A property specifying a property element, where the value type of that property is <xref:System.Windows.ResourceDictionary>. Typically, this is the `Resources` property of <xref:System.Windows.FrameworkElement> or <xref:System.Windows.FrameworkContentElement>, or of <xref:System.Windows.Application> in an application resources case.
*oneOrMoreResources*
One or more resources specified as object elements. Each resource that you specify must have an [x:Key Directive](~/docs/framework/xaml-services/x-key-directive.md) assigned.
]]></format>
</remarks>
<altmember cref="P:System.Windows.FrameworkElement.Resources" />
<altmember cref="P:System.Windows.Application.Resources" />
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ResourceDictionary ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.ResourceDictionary.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; ResourceDictionary();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Windows.ResourceDictionary" /> class.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Add">
<MemberSignature Language="C#" Value="public void Add (object key, object value);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Add(object key, object value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.ResourceDictionary.Add(System.Object,System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Sub Add (key As Object, value As Object)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void Add(System::Object ^ key, System::Object ^ value);" />
<MemberSignature Language="F#" Value="abstract member Add : obj * obj -&gt; unit&#xA;override this.Add : obj * obj -&gt; unit" Usage="resourceDictionary.Add (key, value)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Collections.IDictionary.Add(System.Object,System.Object)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="key" Type="System.Object" />
<Parameter Name="value" Type="System.Object" />
</Parameters>
<Docs>
<param name="key">The name of the key to add.</param>
<param name="value">The value of the resource to add.</param>
<summary>Adds a resource by key to this <see cref="T:System.Windows.ResourceDictionary" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Attempting to add a duplicate key raises an exception.
Keys are always added to the base dictionary. Keys in <xref:System.Windows.ResourceDictionary.MergedDictionaries%2A> within the current <xref:System.Windows.ResourceDictionary> are not checked for duplication, only the base dictionary is checked for duplicates.
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">The <see cref="T:System.Windows.ResourceDictionary" /> is locked or read-only.</exception>
<exception cref="T:System.ArgumentException">An element with the same key already exists in the <see cref="T:System.Collections.Hashtable" />.</exception>
</Docs>
</Member>
<Member MemberName="BeginInit">
<MemberSignature Language="C#" Value="public void BeginInit ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void BeginInit() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.ResourceDictionary.BeginInit" />
<MemberSignature Language="VB.NET" Value="Public Sub BeginInit ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void BeginInit();" />
<MemberSignature Language="F#" Value="abstract member BeginInit : unit -&gt; unit&#xA;override this.BeginInit : unit -&gt; unit" Usage="resourceDictionary.BeginInit " />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.ComponentModel.ISupportInitialize.BeginInit</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Begins the initialization phase for this <see cref="T:System.Windows.ResourceDictionary" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Calling this method is an indication that the contents of the <xref:System.Windows.ResourceDictionary> are about to be loaded. The next step in the process is to call <xref:System.Windows.ResourceDictionary.EndInit%2A>.
Do not call <xref:System.Windows.ResourceDictionary.BeginInit%2A> more than once, before calling <xref:System.Windows.ResourceDictionary.EndInit%2A>. Doing so will raise an exception.
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">Called <see cref="M:System.Windows.ResourceDictionary.BeginInit" /> more than once before <see cref="M:System.Windows.ResourceDictionary.EndInit" /> was called.</exception>
</Docs>
</Member>
<Member MemberName="Clear">
<MemberSignature Language="C#" Value="public void Clear ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Clear() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.ResourceDictionary.Clear" />
<MemberSignature Language="VB.NET" Value="Public Sub Clear ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void Clear();" />
<MemberSignature Language="F#" Value="abstract member Clear : unit -&gt; unit&#xA;override this.Clear : unit -&gt; unit" Usage="resourceDictionary.Clear " />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Collections.IDictionary.Clear</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Clears all keys (and values) in the base <see cref="T:System.Windows.ResourceDictionary" />. This does not clear any merged dictionary items.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If you need to clear merged dictionary items, obtain the particular dictionary from <xref:System.Windows.ResourceDictionary.MergedDictionaries%2A> collection and specifically call <xref:System.Windows.ResourceDictionary.Clear%2A> on that <xref:System.Windows.ResourceDictionary>, although typically the dictionaries are remote and you might not have access. Alternatively, remove the entire <xref:System.Windows.ResourceDictionary> from <xref:System.Windows.ResourceDictionary.MergedDictionaries%2A> by calling Remove on the generic collection.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Contains">
<MemberSignature Language="C#" Value="public bool Contains (object key);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance bool Contains(object key) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.ResourceDictionary.Contains(System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Function Contains (key As Object) As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual bool Contains(System::Object ^ key);" />
<MemberSignature Language="F#" Value="abstract member Contains : obj -&gt; bool&#xA;override this.Contains : obj -&gt; bool" Usage="resourceDictionary.Contains key" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Collections.IDictionary.Contains(System.Object)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="key" Type="System.Object" />
</Parameters>
<Docs>
<param name="key">The key to locate in the <see cref="T:System.Windows.ResourceDictionary" />.</param>
<summary>Determines whether the <see cref="T:System.Windows.ResourceDictionary" /> contains an element with the specified key.</summary>
<returns>
<see langword="true" /> if <see cref="T:System.Windows.ResourceDictionary" /> contains a key-value pair with the specified key; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If the requested key is not in this resource dictionary, the resource lookup logic will also check the merged dictionaries.
]]></format>
</remarks>
<altmember cref="P:System.Windows.ResourceDictionary.MergedDictionaries" />
<altmember cref="M:System.Windows.FrameworkElement.TryFindResource(System.Object)" />
</Docs>
</Member>
<Member MemberName="CopyTo">
<MemberSignature Language="C#" Value="public void CopyTo (System.Collections.DictionaryEntry[] array, int arrayIndex);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void CopyTo(valuetype System.Collections.DictionaryEntry[] array, int32 arrayIndex) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.ResourceDictionary.CopyTo(System.Collections.DictionaryEntry[],System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Sub CopyTo (array As DictionaryEntry(), arrayIndex As Integer)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void CopyTo(cli::array &lt;System::Collections::DictionaryEntry&gt; ^ array, int arrayIndex);" />
<MemberSignature Language="F#" Value="member this.CopyTo : System.Collections.DictionaryEntry[] * int -&gt; unit" Usage="resourceDictionary.CopyTo (array, arrayIndex)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="array" Type="System.Collections.DictionaryEntry[]" />
<Parameter Name="arrayIndex" Type="System.Int32" />
</Parameters>
<Docs>
<param name="array">The one-dimensional array that is the destination of the <see cref="T:System.Collections.DictionaryEntry" /> objects copied from the <see cref="T:System.Windows.ResourceDictionary" /> instance. The array must have zero-based indexing.</param>
<param name="arrayIndex">The zero-based index of <paramref name="array" /> where copying begins.</param>
<summary>Copies the <see cref="T:System.Windows.ResourceDictionary" /> elements to a one-dimensional <see cref="T:System.Collections.DictionaryEntry" /> at the specified index.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This copies only the base dictionary. The result array will have no <xref:System.Windows.ResourceDictionary.MergedDictionaries%2A> if it is reconstituted to be a <xref:System.Windows.ResourceDictionary> again.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Count">
<MemberSignature Language="C#" Value="public int Count { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 Count" />
<MemberSignature Language="DocId" Value="P:System.Windows.ResourceDictionary.Count" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Count As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property int Count { int get(); };" />
<MemberSignature Language="F#" Value="member this.Count : int" Usage="System.Windows.ResourceDictionary.Count" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.Collections.ICollection.Count</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the number of entries in the base <see cref="T:System.Windows.ResourceDictionary" />.</summary>
<value>The current number of entries in the base dictionary.</value>
<remarks>To be added.</remarks>
<altmember cref="P:System.Windows.ResourceDictionary.Item(System.Object)" />
</Docs>
</Member>
<Member MemberName="DeferrableContent">
<MemberSignature Language="C#" Value="public System.Windows.DeferrableContent DeferrableContent { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Windows.DeferrableContent DeferrableContent" />
<MemberSignature Language="DocId" Value="P:System.Windows.ResourceDictionary.DeferrableContent" />
<MemberSignature Language="VB.NET" Value="Public Property DeferrableContent As DeferrableContent" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Windows::DeferrableContent ^ DeferrableContent { System::Windows::DeferrableContent ^ get(); void set(System::Windows::DeferrableContent ^ value); };" />
<MemberSignature Language="F#" Value="member this.DeferrableContent : System.Windows.DeferrableContent with get, set" Usage="System.Windows.ResourceDictionary.DeferrableContent" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netcore-3.0">
<AttributeName>System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Windows.DeferrableContent</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the deferrable content for this resource dictionary.</summary>
<value>Always returns <see langword="null" />.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="EndInit">
<MemberSignature Language="C#" Value="public void EndInit ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void EndInit() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.ResourceDictionary.EndInit" />
<MemberSignature Language="VB.NET" Value="Public Sub EndInit ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void EndInit();" />
<MemberSignature Language="F#" Value="abstract member EndInit : unit -&gt; unit&#xA;override this.EndInit : unit -&gt; unit" Usage="resourceDictionary.EndInit " />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.ComponentModel.ISupportInitialize.EndInit</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Ends the initialization phase, and invalidates the previous tree such that all changes made to keys during the initialization phase can be accounted for.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
<xref:System.Windows.ResourceDictionary.BeginInit%2A> and <xref:System.Windows.ResourceDictionary.EndInit%2A> follow a transaction model. <xref:System.Windows.ResourceDictionary.BeginInit%2A> marks the dictionary uninitialized and <xref:System.Windows.ResourceDictionary.EndInit%2A> marks it initialized.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="FindName">
<MemberSignature Language="C#" Value="public object FindName (string name);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance object FindName(string name) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.ResourceDictionary.FindName(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Function FindName (name As String) As Object" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual System::Object ^ FindName(System::String ^ name);" />
<MemberSignature Language="F#" Value="abstract member FindName : string -&gt; obj&#xA;override this.FindName : string -&gt; obj" Usage="resourceDictionary.FindName name" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Windows.Markup.INameScope.FindName(System.String)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="name" Type="System.String" />
</Parameters>
<Docs>
<param name="name">The name identifier for the object being requested.</param>
<summary>Not supported by this Dictionary implementation.</summary>
<returns>Always returns <see langword="null" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.ResourceDictionary> class does not support registering by name. It uses keys instead.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="GetEnumerator">
<MemberSignature Language="C#" Value="public System.Collections.IDictionaryEnumerator GetEnumerator ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Collections.IDictionaryEnumerator GetEnumerator() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.ResourceDictionary.GetEnumerator" />
<MemberSignature Language="VB.NET" Value="Public Function GetEnumerator () As IDictionaryEnumerator" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual System::Collections::IDictionaryEnumerator ^ GetEnumerator();" />
<MemberSignature Language="F#" Value="abstract member GetEnumerator : unit -&gt; System.Collections.IDictionaryEnumerator&#xA;override this.GetEnumerator : unit -&gt; System.Collections.IDictionaryEnumerator" Usage="resourceDictionary.GetEnumerator " />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Collections.IDictionary.GetEnumerator</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.IDictionaryEnumerator</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Returns an <see cref="T:System.Collections.IDictionaryEnumerator" /> that can be used to iterate through the <see cref="T:System.Windows.ResourceDictionary" />.</summary>
<returns>A specialized enumerator for the <see cref="T:System.Windows.ResourceDictionary" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The iterator is for the base dictionary only.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="InvalidatesImplicitDataTemplateResources">
<MemberSignature Language="C#" Value="public bool InvalidatesImplicitDataTemplateResources { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool InvalidatesImplicitDataTemplateResources" />
<MemberSignature Language="DocId" Value="P:System.Windows.ResourceDictionary.InvalidatesImplicitDataTemplateResources" />
<MemberSignature Language="VB.NET" Value="Public Property InvalidatesImplicitDataTemplateResources As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool InvalidatesImplicitDataTemplateResources { bool get(); void set(bool value); };" />
<MemberSignature Language="F#" Value="member this.InvalidatesImplicitDataTemplateResources : bool with get, set" Usage="System.Windows.ResourceDictionary.InvalidatesImplicitDataTemplateResources" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.7.1;netframework-4.7.2;netframework-4.8;netcore-3.0">
<AttributeName>System.ComponentModel.DefaultValue(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value that indicates whether the invalidations fired by the <see cref="T:System.Windows.ResourceDictionary" /> object cause <see cref="T:System.Windows.Controls.ContentPresenter" /> objects to reevaluate their choice of template.
The invalidations happen when an implicit data template resource changes.</summary>
<value>
<see langword="true" /> if the invalidations cause <see cref="T:System.Windows.Controls.ContentPresenter" /> objects to reevaluate their choice of template; otherwise, <see langword="false" />. The default is <see langword="false" />.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="IsFixedSize">
<MemberSignature Language="C#" Value="public bool IsFixedSize { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IsFixedSize" />
<MemberSignature Language="DocId" Value="P:System.Windows.ResourceDictionary.IsFixedSize" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property IsFixedSize As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool IsFixedSize { bool get(); };" />
<MemberSignature Language="F#" Value="member this.IsFixedSize : bool" Usage="System.Windows.ResourceDictionary.IsFixedSize" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.Collections.IDictionary.IsFixedSize</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets whether this <see cref="T:System.Windows.ResourceDictionary" /> is fixed-size.</summary>
<value>
<see langword="true" /> if the hash table is fixed-size; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The default implementation returns the <xref:System.Collections.Hashtable> default, which is `false`.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="IsReadOnly">
<MemberSignature Language="C#" Value="public bool IsReadOnly { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IsReadOnly" />
<MemberSignature Language="DocId" Value="P:System.Windows.ResourceDictionary.IsReadOnly" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property IsReadOnly As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property bool IsReadOnly { bool get(); };" />
<MemberSignature Language="F#" Value="member this.IsReadOnly : bool" Usage="System.Windows.ResourceDictionary.IsReadOnly" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets whether this <see cref="T:System.Windows.ResourceDictionary" /> is read-only.</summary>
<value>
<see langword="true" /> if the hash table is read-only; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This property returns the <xref:System.Collections.Hashtable> default, which is `false`.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Item">
<MemberSignature Language="C#" Value="public object this[object key] { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance object Item(object)" />
<MemberSignature Language="DocId" Value="P:System.Windows.ResourceDictionary.Item(System.Object)" />
<MemberSignature Language="VB.NET" Value="Default Public Property Item(key As Object) As Object" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Object ^ default[System::Object ^] { System::Object ^ get(System::Object ^ key); void set(System::Object ^ key, System::Object ^ value); };" />
<MemberSignature Language="F#" Value="member this.Item(obj) : obj with get, set" Usage="System.Windows.ResourceDictionary.Item" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.Collections.IDictionary.Item(System.Object)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="key" Type="System.Object" />
</Parameters>
<Docs>
<param name="key">The desired key to get or set.</param>
<summary>Gets or sets the value associated with the given key.</summary>
<value>Value of the key.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If the requested key is not in this resource dictionary, the framework resource system will also check the merged dictionaries.
Checking a <xref:System.Windows.ResourceDictionary> by item or index is not generally the preferred way to retrieve resources. You should instead call methods that are capable of participating in the full resource lookup process and look up resources by their keys, and that can find the resources in applications or themes. <xref:System.Windows.FrameworkElement.FindResource%2A> is such a method, and is present on any <xref:System.Windows.FrameworkElement>. Otherwise your attempt to find the resource does not match the true run-time behavior.
However, obtaining resources directly from an individual dictionary might be appropriate if you are retrieving resources from a known <xref:System.Windows.ResourceDictionary> location, and are doing so to avoid the possible performance and scope implications of run-time key lookup.
You do not use indexers to define collection members in [!INCLUDE[TLA2#tla_xaml](~/includes/tla2sharptla-xaml-md.md)]. Instead, you create child elements in markup. The child elements are either child elements of <xref:System.Windows.ResourceDictionary>, or of a property element where the property type is `ResourceDictionary`. For details, see the [!INCLUDE[TLA2#tla_xaml](~/includes/tla2sharptla-xaml-md.md)] usage sections in <xref:System.Windows.ResourceDictionary>.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Keys">
<MemberSignature Language="C#" Value="public System.Collections.ICollection Keys { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Collections.ICollection Keys" />
<MemberSignature Language="DocId" Value="P:System.Windows.ResourceDictionary.Keys" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Keys As ICollection" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Collections::ICollection ^ Keys { System::Collections::ICollection ^ get(); };" />
<MemberSignature Language="F#" Value="member this.Keys : System.Collections.ICollection" Usage="System.Windows.ResourceDictionary.Keys" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.Collections.IDictionary.Keys</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.ICollection</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a collection of all keys contained in this <see cref="T:System.Windows.ResourceDictionary" />.</summary>
<value>The collection of all keys.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This property exists because it is required by <xref:System.Collections.IDictionary>, but <xref:System.Windows.ResourceDictionary.Keys%2A> generally is not useful for most <xref:System.Windows.ResourceDictionary> scenarios.
The returned keys do not include keys within the <xref:System.Windows.ResourceDictionary.MergedDictionaries%2A>. Also the keys collection is a snapshot of the keys in the base dictionary. If you subsequently make changes to this <xref:System.Windows.ResourceDictionary>, a stored <xref:System.Windows.ResourceDictionary.Keys%2A> will not reflect the changes.
]]></format>
</remarks>
<altmember cref="P:System.Windows.ResourceDictionary.Item(System.Object)" />
</Docs>
</Member>
<Member MemberName="MergedDictionaries">
<MemberSignature Language="C#" Value="public System.Collections.ObjectModel.Collection&lt;System.Windows.ResourceDictionary&gt; MergedDictionaries { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Collections.ObjectModel.Collection`1&lt;class System.Windows.ResourceDictionary&gt; MergedDictionaries" />
<MemberSignature Language="DocId" Value="P:System.Windows.ResourceDictionary.MergedDictionaries" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property MergedDictionaries As Collection(Of ResourceDictionary)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Collections::ObjectModel::Collection&lt;System::Windows::ResourceDictionary ^&gt; ^ MergedDictionaries { System::Collections::ObjectModel::Collection&lt;System::Windows::ResourceDictionary ^&gt; ^ get(); };" />
<MemberSignature Language="F#" Value="member this.MergedDictionaries : System.Collections.ObjectModel.Collection&lt;System.Windows.ResourceDictionary&gt;" Usage="System.Windows.ResourceDictionary.MergedDictionaries" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.ObjectModel.Collection&lt;System.Windows.ResourceDictionary&gt;</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a collection of the <see cref="T:System.Windows.ResourceDictionary" /> dictionaries that constitute the various resource dictionaries in the merged dictionaries.</summary>
<value>The collection of merged dictionaries.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Dictionaries are merged by adding a <xref:System.Windows.ResourceDictionary> to the generic collection referenced by <xref:System.Windows.ResourceDictionary.MergedDictionaries%2A>. A merged <xref:System.Windows.ResourceDictionary> does not have resource elements defined within it in markup. Instead, the merged dictionary is a <xref:System.Windows.ResourceDictionary> with no markup child elements defined (or with no elements added through code), but with a [!INCLUDE[TLA2#tla_uri](~/includes/tla2sharptla-uri-md.md)] specified for <xref:System.Windows.ResourceDictionary.Source%2A>. The <xref:System.Windows.ResourceDictionary.Source%2A> designation enables the merged dictionary to come from an external source, such as a separate resource assembly that ships with the application, "loose [!INCLUDE[TLA2#tla_xaml](~/includes/tla2sharptla-xaml-md.md)]", or a specific localization or global resources assembly.
Specifying resource elements within a <xref:System.Windows.ResourceDictionary> that has <xref:System.Windows.ResourceDictionary.Source%2A> specified is not supported.
Lookup behavior within the <xref:System.Windows.ResourceDictionary.MergedDictionaries%2A> collection will search the last-added <xref:System.Windows.ResourceDictionary> first, and the search stops as soon as a requested key is found. Duplicate keys across the collection of merged dictionaries are not illegal. For more information on merged dictionary behavior, see [Merged Resource Dictionaries](~/docs/framework/wpf/advanced/merged-resource-dictionaries.md).
<a name="xamlPropertyElementUsage_MergedDictionaries"></a>
## XAML Property Element Usage
```
<object>
<object.MergedDictionaries>
oneOrMoreResourceDictionaries
</object.MergedDictionaries>
</object>
```
<a name="xamlValues_MergedDictionaries"></a>
## XAML Values
*oneOrMoreResourceDictionaries*
One or more <xref:System.Windows.ResourceDictionary> object elements. A <xref:System.Windows.ResourceDictionary> used for <xref:System.Windows.ResourceDictionary.MergedDictionaries%2A> does not have collection content, and specifies a <xref:System.Windows.ResourceDictionary.Source%2A> attribute that references the complete <xref:System.Windows.ResourceDictionary> remotely.
## Examples
The following example specifies two <xref:System.Windows.ResourceDictionary> elements to be merged into the primary <xref:System.Windows.ResourceDictionary>.
[!code-xaml[ResourceMergeDictionary#MergedXAML](~/samples/snippets/csharp/VS_Snippets_Wpf/ResourceMergeDictionary/CS/default.xaml#mergedxaml)]
]]></format>
</remarks>
<altmember cref="P:System.Windows.ResourceDictionary.Source" />
</Docs>
</Member>
<Member MemberName="OnGettingValue">
<MemberSignature Language="C#" Value="protected virtual void OnGettingValue (object key, ref object value, out bool canCache);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void OnGettingValue(object key, object&amp; value, [out] bool&amp; canCache) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.ResourceDictionary.OnGettingValue(System.Object,System.Object@,System.Boolean@)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub OnGettingValue (key As Object, ByRef value As Object, ByRef canCache As Boolean)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual void OnGettingValue(System::Object ^ key, System::Object ^ % value, [Runtime::InteropServices::Out] bool % canCache);" />
<MemberSignature Language="F#" Value="abstract member OnGettingValue : obj * * -&gt; unit&#xA;override this.OnGettingValue : obj * * -&gt; unit" Usage="resourceDictionary.OnGettingValue (key, value, canCache)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="key" Type="System.Object" Index="0" FrameworkAlternate="netcore-3.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
<Parameter Name="value" Type="System.Object" RefType="ref" Index="1" FrameworkAlternate="netcore-3.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
<Parameter Name="canCache" Type="System.Boolean" RefType="out" Index="2" FrameworkAlternate="netcore-3.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
</Parameters>
<Docs>
<param name="key">The key of the resource to get.</param>
<param name="value">The value of the requested resource.</param>
<param name="canCache">
<see langword="true" /> if the resource can be saved and used later; otherwise, <see langword="false" />.</param>
<summary>Occurs when the <see cref="T:System.Windows.ResourceDictionary" /> receives a request for a resource.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="RegisterName">
<MemberSignature Language="C#" Value="public void RegisterName (string name, object scopedElement);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void RegisterName(string name, object scopedElement) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.ResourceDictionary.RegisterName(System.String,System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Sub RegisterName (name As String, scopedElement As Object)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void RegisterName(System::String ^ name, System::Object ^ scopedElement);" />
<MemberSignature Language="F#" Value="abstract member RegisterName : string * obj -&gt; unit&#xA;override this.RegisterName : string * obj -&gt; unit" Usage="resourceDictionary.RegisterName (name, scopedElement)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Windows.Markup.INameScope.RegisterName(System.String,System.Object)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="name" Type="System.String" />
<Parameter Name="scopedElement" Type="System.Object" />
</Parameters>
<Docs>
<param name="name">Not supported.</param>
<param name="scopedElement">Not supported.</param>
<summary>Not supported by this Dictionary implementation.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.ResourceDictionary> class does not support registering by name. It uses keys instead. The XAML namescope methods are implemented as inoperative versions in <xref:System.Windows.ResourceDictionary> to make it clear that XAML names do not apply to resources.
Calling this method will cause a <xref:System.NotSupportedException> to be thrown.
]]></format>
</remarks>
<exception cref="T:System.NotSupportedException">In all cases when this method is called.</exception>
</Docs>
</Member>
<Member MemberName="Remove">
<MemberSignature Language="C#" Value="public void Remove (object key);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Remove(object key) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.ResourceDictionary.Remove(System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Sub Remove (key As Object)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void Remove(System::Object ^ key);" />
<MemberSignature Language="F#" Value="abstract member Remove : obj -&gt; unit&#xA;override this.Remove : obj -&gt; unit" Usage="resourceDictionary.Remove key" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Collections.IDictionary.Remove(System.Object)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="key" Type="System.Object" />
</Parameters>
<Docs>
<param name="key">Key of the entry to remove.</param>
<summary>Removes the entry with the specified key from the base dictionary.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If the <xref:System.Windows.ResourceDictionary> does not contain an element with the specified key, the <xref:System.Windows.ResourceDictionary> remains unchanged. No exception is raised.
This method does not remove keys from the <xref:System.Windows.ResourceDictionary.MergedDictionaries%2A>. You must obtain the specific <xref:System.Windows.ResourceDictionary> from the collection to remove those keys, but that might not be possible because you are typically accessing such a dictionary remotely.
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">The <see cref="T:System.Windows.ResourceDictionary" /> is locked or read-only.</exception>
</Docs>
</Member>
<Member MemberName="Source">
<MemberSignature Language="C#" Value="public Uri Source { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Uri Source" />
<MemberSignature Language="DocId" Value="P:System.Windows.ResourceDictionary.Source" />
<MemberSignature Language="VB.NET" Value="Public Property Source As Uri" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property Uri ^ Source { Uri ^ get(); void set(Uri ^ value); };" />
<MemberSignature Language="F#" Value="member this.Source : Uri with get, set" Usage="System.Windows.ResourceDictionary.Source" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Uri</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the [!INCLUDE[TLA#tla_uri](~/includes/tlasharptla-uri-md.md)] to load resources from.</summary>
<value>The source location of an external resource dictionary.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Typically, <xref:System.Windows.ResourceDictionary.Source%2A> is specified as a Pack URI, which references the location of a resource dictionary that is included as a noncompiled Resource or Content build action by your application building project. For details on the Pack URI format, see [Pack URIs in WPF](~/docs/framework/wpf/app-development/pack-uris-in-wpf.md).
Generally, the <xref:System.Windows.ResourceDictionary.Source%2A> property is set only for a <xref:System.Windows.ResourceDictionary> that is specified for the <xref:System.Windows.ResourceDictionary.MergedDictionaries%2A> property (either as a property element in [!INCLUDE[TLA2#tla_xaml](~/includes/tla2sharptla-xaml-md.md)], or as a <xref:System.Windows.ResourceDictionary> item of the collection in code). In this context, setting the value for <xref:System.Windows.ResourceDictionary.Source%2A> will merge the dictionary contents found at the supplied [!INCLUDE[TLA2#tla_uri](~/includes/tla2sharptla-uri-md.md)] into the current <xref:System.Windows.ResourceDictionary>. Any load failures will cause an exception to be thrown.
## Examples
The following example specifies two <xref:System.Windows.ResourceDictionary> elements to be merged into the primary <xref:System.Windows.ResourceDictionary>.
[!code-xaml[ResourceMergeDictionary#MergedXAML](~/samples/snippets/csharp/VS_Snippets_Wpf/ResourceMergeDictionary/CS/default.xaml#mergedxaml)]
]]></format>
</remarks>
<altmember cref="P:System.Windows.ResourceDictionary.MergedDictionaries" />
</Docs>
</Member>
<Member MemberName="System.Collections.ICollection.CopyTo">
<MemberSignature Language="C#" Value="void ICollection.CopyTo (Array array, int arrayIndex);" />
<MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance void System.Collections.ICollection.CopyTo(class System.Array array, int32 arrayIndex) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.ResourceDictionary.System#Collections#ICollection#CopyTo(System.Array,System.Int32)" />
<MemberSignature Language="C++ CLI" Value=" virtual void System.Collections.ICollection.CopyTo(Array ^ array, int arrayIndex) = System::Collections::ICollection::CopyTo;" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Collections.ICollection.CopyTo(System.Array,System.Int32)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="array" Type="System.Array" />
<Parameter Name="arrayIndex" Type="System.Int32" />
</Parameters>
<Docs>
<param name="array">A zero-based <see cref="T:System.Array" /> that receives the copied items from the <see cref="T:System.Windows.Markup.Localizer.BamlLocalizationDictionary" />.</param>
<param name="arrayIndex">The first position in the specified <see cref="T:System.Array" /> to receive the copied contents.</param>
<summary>For a description of this member, see <see cref="M:System.Collections.ICollection.CopyTo(System.Array,System.Int32)" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This member is an explicit interface member implementation. It can be used only when the <xref:System.Windows.ResourceDictionary> instance is cast to an <xref:System.Collections.ICollection> interface.
]]></format>
</remarks>
<altmember cref="M:System.Windows.ResourceDictionary.CopyTo(System.Collections.DictionaryEntry[],System.Int32)" />
</Docs>
</Member>
<Member MemberName="System.Collections.ICollection.IsSynchronized">
<MemberSignature Language="C#" Value="bool System.Collections.ICollection.IsSynchronized { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool System.Collections.ICollection.IsSynchronized" />
<MemberSignature Language="DocId" Value="P:System.Windows.ResourceDictionary.System#Collections#ICollection#IsSynchronized" />
<MemberSignature Language="VB.NET" Value=" ReadOnly Property IsSynchronized As Boolean Implements ICollection.IsSynchronized" />
<MemberSignature Language="C++ CLI" Value="property bool System::Collections::ICollection::IsSynchronized { bool get(); };" />
<MemberSignature Language="F#" Usage="System.Collections.ICollection.IsSynchronized" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.Collections.ICollection.IsSynchronized</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>For a description of this member, see <see cref="P:System.Collections.ICollection.IsSynchronized" />.</summary>
<value>
<see langword="true" /> if access to <see cref="T:System.Windows.ResourceDictionary" /> is synchronized (thread safe); otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This member is an explicit interface member implementation. It can be used only when the <xref:System.Windows.ResourceDictionary> instance is cast to an <xref:System.Collections.ICollection> interface.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="System.Collections.ICollection.SyncRoot">
<MemberSignature Language="C#" Value="object System.Collections.ICollection.SyncRoot { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance object System.Collections.ICollection.SyncRoot" />
<MemberSignature Language="DocId" Value="P:System.Windows.ResourceDictionary.System#Collections#ICollection#SyncRoot" />
<MemberSignature Language="VB.NET" Value=" ReadOnly Property SyncRoot As Object Implements ICollection.SyncRoot" />
<MemberSignature Language="C++ CLI" Value="property System::Object ^ System::Collections::ICollection::SyncRoot { System::Object ^ get(); };" />
<MemberSignature Language="F#" Usage="System.Collections.ICollection.SyncRoot" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.Collections.ICollection.SyncRoot</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Docs>
<summary>For a description of this member, see <see cref="P:System.Collections.ICollection.SyncRoot" />.</summary>
<value>An object that can be used to synchronize access to <see cref="T:System.Windows.ResourceDictionary" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This member is an explicit interface member implementation. It can be used only when the <xref:System.Windows.ResourceDictionary> instance is cast to an <xref:System.Collections.ICollection> interface.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="System.Collections.IEnumerable.GetEnumerator">
<MemberSignature Language="C#" Value="System.Collections.IEnumerator IEnumerable.GetEnumerator ();" />
<MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance class System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.ResourceDictionary.System#Collections#IEnumerable#GetEnumerator" />
<MemberSignature Language="VB.NET" Value="Function GetEnumerator () As IEnumerator Implements IEnumerable.GetEnumerator" />
<MemberSignature Language="C++ CLI" Value=" virtual System::Collections::IEnumerator ^ System.Collections.IEnumerable.GetEnumerator() = System::Collections::IEnumerable::GetEnumerator;" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Collections.IEnumerable.GetEnumerator</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.IEnumerator</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>For a description of this member, see <see cref="M:System.Collections.IEnumerable.GetEnumerator" />.</summary>
<returns>An <see cref="T:System.Collections.IEnumerator" /> object that can be used to iterate through the collection.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This member is an explicit interface member implementation. It can be used only when the <xref:System.Windows.ResourceDictionary> instance is cast to an <xref:System.Collections.IEnumerable> interface.
]]></format>
</remarks>
<altmember cref="M:System.Windows.ResourceDictionary.GetEnumerator" />
</Docs>
</Member>
<Member MemberName="System.Windows.Markup.IUriContext.BaseUri">
<MemberSignature Language="C#" Value="Uri System.Windows.Markup.IUriContext.BaseUri { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Uri System.Windows.Markup.IUriContext.BaseUri" />
<MemberSignature Language="DocId" Value="P:System.Windows.ResourceDictionary.System#Windows#Markup#IUriContext#BaseUri" />
<MemberSignature Language="VB.NET" Value=" Property BaseUri As Uri Implements IUriContext.BaseUri" />
<MemberSignature Language="C++ CLI" Value="property Uri ^ System::Windows::Markup::IUriContext::BaseUri { Uri ^ get(); void set(Uri ^ value); };" />
<MemberSignature Language="F#" Usage="System.Windows.Markup.IUriContext.BaseUri" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.Windows.Markup.IUriContext.BaseUri</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Uri</ReturnType>
</ReturnValue>
<Docs>
<summary>For a description of this member, see <see cref="P:System.Windows.Markup.IUriContext.BaseUri" />.</summary>
<value>The base [!INCLUDE[TLA2#tla_uri](~/includes/tla2sharptla-uri-md.md)] of the current context.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This member is an explicit interface member implementation. It can be used only when the <xref:System.Windows.ResourceDictionary> instance is cast to an <xref:System.Windows.Markup.IUriContext> interface.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="UnregisterName">
<MemberSignature Language="C#" Value="public void UnregisterName (string name);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void UnregisterName(string name) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.ResourceDictionary.UnregisterName(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Sub UnregisterName (name As String)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void UnregisterName(System::String ^ name);" />
<MemberSignature Language="F#" Value="abstract member UnregisterName : string -&gt; unit&#xA;override this.UnregisterName : string -&gt; unit" Usage="resourceDictionary.UnregisterName name" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Windows.Markup.INameScope.UnregisterName(System.String)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="name" Type="System.String" />
</Parameters>
<Docs>
<param name="name">Not supported.</param>
<summary>Not supported by this Dictionary implementation.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.ResourceDictionary> class does not support registering by name. It uses keys instead. Calling this method does nothing.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Values">
<MemberSignature Language="C#" Value="public System.Collections.ICollection Values { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Collections.ICollection Values" />
<MemberSignature Language="DocId" Value="P:System.Windows.ResourceDictionary.Values" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Values As ICollection" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Collections::ICollection ^ Values { System::Collections::ICollection ^ get(); };" />
<MemberSignature Language="F#" Value="member this.Values : System.Collections.ICollection" Usage="System.Windows.ResourceDictionary.Values" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.Collections.IDictionary.Values</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>PresentationFramework</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Collections.ICollection</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a collection of all values associated with keys contained in this <see cref="T:System.Windows.ResourceDictionary" />.</summary>
<value>The collection of all values.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This property exists because it is required by <xref:System.Collections.IDictionary>, but generally is not useful for most <xref:System.Windows.ResourceDictionary> scenarios.
The returned values do not include values within the <xref:System.Windows.ResourceDictionary.MergedDictionaries%2A>. Also the collection is a snapshot of the values in the base dictionary. If you subsequently make changes to this <xref:System.Windows.ResourceDictionary>, a stored <xref:System.Windows.ResourceDictionary.Values%2A> will not reflect the changes.
]]></format>
</remarks>
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.