C# Class WPFLocalizeExtension.Providers.CSVLocalizationProvider

A singleton CSV provider that uses attached properties and the Parent property to iterate through the visual tree.
Inheritance: CSVLocalizationProviderBase
Exibir arquivo Open project: SeriousM/WPFLocalizationExtension

Public Properties

Property Type Description
DefaultDictionaryProperty System.Windows.DependencyProperty

Public Methods

Method Description
GetDefaultDictionary ( DependencyObject obj ) : string

Getter of DependencyProperty default dictionary.

GetLocalizedObject ( string key, DependencyObject target, CultureInfo culture ) : object

Get the localized object.

SetDefaultDictionary ( DependencyObject obj, string value ) : void

Setter of DependencyProperty default dictionary.

Protected Methods

Method Description
GetAssembly ( DependencyObject target ) : string

Get the assembly from the context, if possible.

GetDictionary ( DependencyObject target ) : string

Get the dictionary from the context, if possible.

Private Methods

Method Description
AttachedPropertyChanged ( DependencyObject obj, System.Windows.DependencyPropertyChangedEventArgs args ) : void

Indicates, that one of the attached properties changed.

CSVLocalizationProvider ( ) : System

The singleton constructor.

ParentChangedAction ( DependencyObject obj ) : void

An action that will be called when a parent of one of the observed target objects changed.

Method Details

GetAssembly() protected method

Get the assembly from the context, if possible.
protected GetAssembly ( DependencyObject target ) : string
target System.Windows.DependencyObject The target object.
return string

GetDefaultDictionary() public static method

Getter of DependencyProperty default dictionary.
public static GetDefaultDictionary ( DependencyObject obj ) : string
obj System.Windows.DependencyObject The dependency object to get the default dictionary from.
return string

GetDictionary() protected method

Get the dictionary from the context, if possible.
protected GetDictionary ( DependencyObject target ) : string
target System.Windows.DependencyObject The target object.
return string

GetLocalizedObject() public method

Get the localized object.
public GetLocalizedObject ( string key, DependencyObject target, CultureInfo culture ) : object
key string The key to the value.
target System.Windows.DependencyObject The target object.
culture System.Globalization.CultureInfo The culture to use.
return object

SetDefaultDictionary() public static method

Setter of DependencyProperty default dictionary.
public static SetDefaultDictionary ( DependencyObject obj, string value ) : void
obj System.Windows.DependencyObject The dependency object to set the default dictionary to.
value string The dictionary.
return void

Property Details

DefaultDictionaryProperty public_oe static_oe property

DependencyProperty DefaultDictionary to set the fallback resource dictionary.
public static DependencyProperty,System.Windows DefaultDictionaryProperty
return System.Windows.DependencyProperty