C# Class WPFLocalizeExtension.Extensions.FELoc

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

Public Properties

Property Type Description
ConverterParameterProperty System.Windows.DependencyProperty
ConverterProperty System.Windows.DependencyProperty
ForceCultureProperty System.Windows.DependencyProperty
KeyProperty System.Windows.DependencyProperty

Public Methods

Method 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.

Protected Methods

Method 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

Method 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 method

Clears the common resource buffer.
public static ClearResourceBuffer ( ) : void
return void

Dispose() public method

Removes the listener from the dictionary.
public Dispose ( ) : void
return void

FELoc() public method

Initializes a new instance of the BLoc class.
public FELoc ( ) : System
return System

FELoc() public method

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

FormatOutput() public method

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

GetForcedCultureOrDefault() protected method

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
return System.Globalization.CultureInfo

ResourceChanged() public method

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.
return void

Property Details

ConverterParameterProperty public_oe static_oe property

DependencyProperty ConverterParameter.
public static DependencyProperty,System.Windows ConverterParameterProperty
return 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
return System.Windows.DependencyProperty

ForceCultureProperty public_oe static_oe property

DependencyProperty ForceCulture.
public static DependencyProperty,System.Windows ForceCultureProperty
return System.Windows.DependencyProperty

KeyProperty public_oe static_oe property

DependencyProperty Key to set the resource key.
public static DependencyProperty,System.Windows KeyProperty
return System.Windows.DependencyProperty