[]
        
(Showing Draft Content)

C1.WPF.Localization.C1LocalizeExtension

C1LocalizeExtension Class

Represents a MarkupExtension providing localized strings from .resx resources.

Inheritance
C1LocalizeExtension
Namespace: C1.WPF.Localization
Assembly: C1.WPF.4.6.2.dll
Syntax
public class C1LocalizeExtension : MarkupExtension
Remarks

The C1LocalizeExtension doesn't track culture changes after the first call. This functionality should be implemented in derived classes if necessary.

Constructors

Name Description
C1LocalizeExtension()

Initializes a new instance of the C1LocalizeExtension class.

C1LocalizeExtension(string)

Initializes a new instance of the C1LocalizeExtension class.

C1LocalizeExtension(string, string)

Initializes a new instance of the C1LocalizeExtension class.

Properties

Name Description
Assembly

Gets or sets the name of the Assembly where the .resx is located. By default returns the value of the DefaultAssembly property.

CurrentAssembly
DefaultValue

Gets or sets the default value.

Dictionary

Gets or sets the name of the .resx dictionary. If it is null, returns the default string 'Resources'.

Key

Gets or sets the key of a .resx object

Methods

Name Description
DetermineCulture(DependencyObject)

When overridden in a derived class, returns a CultureInfo that should be used for localization. Default implementation returns the value of the DefaultCulture property.

ProvideValue(IServiceProvider)

Returns an object that is set as the value of the target property for this markup extension.

SetNewValue(object)

Sets the value of the DependencyProperty to the passed Value