Export (0) Print
Expand All

BamlLocalizationDictionary Class

Contains all the localizable resources in a binary XAML (BAML) record.

Namespace: System.Windows.Markup.Localizer
Assembly: PresentationFramework (in presentationframework.dll)

public sealed class BamlLocalizationDictionary : IDictionary, ICollection, IEnumerable
public final class BamlLocalizationDictionary implements IDictionary, ICollection, 
	IEnumerable
public final class BamlLocalizationDictionary implements IDictionary, ICollection, 
	IEnumerable
<BamlLocalizationDictionary .../>

The dictionary contains a mapping from resource keys (defined 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
        );                                
}

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

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

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2014 Microsoft