C# Class WPFLocalizeExtension.Extensions.FELoc

A localization utility based on FrameworkElement.
Inheritance: System.Windows.FrameworkElement, IDictionaryEventListener, INotifyPropertyChanged, IDisposable
Afficher le fichier Open project: SeriousM/WPFLocalizationExtension

Méthodes publiques

Свойство Type Description
ConverterParameterProperty System.Windows.DependencyProperty
ConverterProperty System.Windows.DependencyProperty
ForceCultureProperty System.Windows.DependencyProperty
KeyProperty System.Windows.DependencyProperty

Méthodes publiques

Méthode Description
ClearResourceBuffer ( ) : void

Clears the common resource buffer.

Dispose ( ) : void

Removes the listener from the dictionary.

FELoc ( ) : System

Initializes a new instance of the BLoc class.

FELoc ( string key ) : System

Initializes a new instance of the BLoc class.

FormatOutput ( ) : object

This function returns the properly prepared output of the markup extension.

ResourceChanged ( DependencyObject sender, DictionaryEventArgs e ) : void

This method is called when the resource somehow changed.

Méthodes protégées

Méthode Description
GetForcedCultureOrDefault ( ) : CultureInfo

If Culture property defines a valid CultureInfo, a CultureInfo instance will get created and returned, otherwise LocalizeDictionary.Culture will get returned.

Private Methods

Méthode Description
DependencyPropertyChanged ( DependencyObject obj, System.Windows.DependencyPropertyChangedEventArgs args ) : void

Indicates, that the key changed.

GetAttachedProperties ( DependencyObject obj ) : IList
GetDependencyProperties ( Object element ) : List

Based on http://social.msdn.microsoft.com/Forums/en/wpf/thread/580234cb-e870-4af1-9a91-3e3ba118c89c

RaisePropertyChanged ( string property ) : void

Notify that a property has changed

RegisterParentNotifier ( ) : void
SafeAddItemToResourceBuffer ( string key, object item ) : void

Adds an item to the resource buffer (threadsafe).

SafeRemoveItemFromResourceBuffer ( string key ) : void

Removes an item from the resource buffer (threadsafe).

UpdateNewValue ( ) : void

Method Details

ClearResourceBuffer() public static méthode

Clears the common resource buffer.
public static ClearResourceBuffer ( ) : void
Résultat void

Dispose() public méthode

Removes the listener from the dictionary.
public Dispose ( ) : void
Résultat void

FELoc() public méthode

Initializes a new instance of the BLoc class.
public FELoc ( ) : System
Résultat System

FELoc() public méthode

Initializes a new instance of the BLoc class.
public FELoc ( string key ) : System
key string The resource identifier.
Résultat System

FormatOutput() public méthode

This function returns the properly prepared output of the markup extension.
public FormatOutput ( ) : object
Résultat object

GetForcedCultureOrDefault() protected méthode

If Culture property defines a valid CultureInfo, a CultureInfo instance will get created and returned, otherwise LocalizeDictionary.Culture will get returned.
/// thrown if the parameter Culture don't defines a valid ///
protected GetForcedCultureOrDefault ( ) : CultureInfo
Résultat System.Globalization.CultureInfo

ResourceChanged() public méthode

This method is called when the resource somehow changed.
public ResourceChanged ( DependencyObject sender, DictionaryEventArgs e ) : void
sender System.Windows.DependencyObject The sender.
e DictionaryEventArgs The event arguments.
Résultat void

Property Details

ConverterParameterProperty public_oe static_oe property

DependencyProperty ConverterParameter.
public static DependencyProperty,System.Windows ConverterParameterProperty
Résultat System.Windows.DependencyProperty

ConverterProperty public_oe static_oe property

DependencyProperty Converter to set the IValueConverter used to adapt to the target.
public static DependencyProperty,System.Windows ConverterProperty
Résultat System.Windows.DependencyProperty

ForceCultureProperty public_oe static_oe property

DependencyProperty ForceCulture.
public static DependencyProperty,System.Windows ForceCultureProperty
Résultat System.Windows.DependencyProperty

KeyProperty public_oe static_oe property

DependencyProperty Key to set the resource key.
public static DependencyProperty,System.Windows KeyProperty
Résultat System.Windows.DependencyProperty