Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

BamlLocalizationDictionary Class

Contains all the localizable resources in a BAML record.

System.Object
  System.Windows.Markup.Localizer.BamlLocalizationDictionary

Namespace:  System.Windows.Markup.Localizer
Assembly:  PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: Not mapped to an xmlns.

public sealed class BamlLocalizationDictionary : IDictionary, 
	ICollection, IEnumerable

The BamlLocalizationDictionary type exposes the following members.

  NameDescription
Public methodBamlLocalizationDictionaryInitializes a new instance of the BamlLocalizationDictionary class.
Top

  NameDescription
Public propertyCountGets the number of localizable resources in the BamlLocalizationDictionary.
Public propertyIsFixedSizeGets a value that indicates whether the BamlLocalizationDictionary object has a fixed size.
Public propertyIsReadOnlyGets a value that indicates whether the BamlLocalizationDictionary object is read-only.
Public propertyItemGets or sets a localizable resource specified by its key.
Public propertyKeysGets a collection that contains all the keys in the BamlLocalizationDictionary object.
Public propertyRootElementKeyGets the key of the root element, if it is localizable.
Public propertyValuesGets a collection that contains all the values in the BamlLocalizationDictionary.
Top

  NameDescription
Public methodAddAdds an item with the provided key and value to the BamlLocalizationDictionary.
Public methodClearDeletes all resources from the BamlLocalizationDictionary object.
Public methodContainsDetermines whether a BamlLocalizationDictionary object contains a resource with a specified key.
Public methodCopyToCopies the contents of a BamlLocalizationDictionary object to a one-dimensional array of DictionaryEntry objects, starting at a specified index.
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public methodGetEnumeratorReturns an enumerator that iterates through the BamlLocalizationDictionary.
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodRemoveRemoves a specified localizable resource from the BamlLocalizationDictionary.
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

  NameDescription
Public Extension MethodAsParallelEnables parallelization of a query. (Defined by ParallelEnumerable.)
Public Extension MethodAsQueryableConverts an IEnumerable to an IQueryable. (Defined by Queryable.)
Public Extension MethodCast<TResult>Casts the elements of an IEnumerable to the specified type. (Defined by Enumerable.)
Public Extension MethodOfType<TResult>Filters the elements of an IEnumerable based on a specified type. (Defined by Enumerable.)
Top

  NameDescription
Explicit interface implemetationPrivate methodICollection.CopyToInfrastructure. For a description of this member, see ICollection.CopyTo.
Explicit interface implemetationPrivate propertyICollection.CountInfrastructure. For a description of this member, see ICollection.Count.
Explicit interface implemetationPrivate propertyICollection.IsSynchronizedInfrastructure. For a description of this member, see ICollection.IsSynchronized.
Explicit interface implemetationPrivate propertyICollection.SyncRootInfrastructure. For a description of this member, see ICollection.SyncRoot.
Explicit interface implemetationPrivate methodIDictionary.AddInfrastructure. For a description of this member, see IDictionary.Add.
Explicit interface implemetationPrivate methodIDictionary.ContainsInfrastructure. For a description of this member, see IDictionary.Contains.
Explicit interface implemetationPrivate methodIDictionary.GetEnumeratorInfrastructure. For a description of this member, see IDictionary.GetEnumerator.
Explicit interface implemetationPrivate propertyIDictionary.ItemInfrastructure. For a description of this member, see IDictionary.Item.
Explicit interface implemetationPrivate methodIDictionary.RemoveInfrastructure. For a description of this member, see IDictionary.Remove.
Explicit interface implemetationPrivate methodIEnumerable.GetEnumeratorInfrastructure. For a description of this member, see IEnumerable.GetEnumerator.
Top

The dictionary contains a mapping from resource keys (specified as BamlLocalizableResourceKey objects) to resource values (specified as BamlLocalizableResource objects).

The following example demonstrates how to use a BamlLocalizationDictionary.


// Obtain the BAML stream.
Stream source = entry.Value as Stream;

// Create a BamlLocalizer on the stream.
BamlLocalizer localizer = new BamlLocalizer(source);
BamlLocalizationDictionary resources = localizer.ExtractResources();

// Write out all the localizable resources in the BAML. 
foreach (DictionaryEntry resourceEntry in resources)
{
    BamlLocalizableResourceKey key = resourceEntry.Key as BamlLocalizableResourceKey;
    BamlLocalizableResource value = resourceEntry.Value as BamlLocalizableResource;
    Console.WriteLine(
        "    {0}.{1}.{2} = {3}",
        key.Uid,
        key.ClassName,
        key.PropertyName,
        value.Content
        );                                
}

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft