Table of Contents

Class LocalizeArgs

Namespace
RentADeveloper.ResXLocalization.Avalonia
Assembly
ResXLocalization.Avalonia.dll

Hosts the Arg0Arg8 attached properties that supply dynamic composite-format arguments to LocalizeExtension. Bind them on the element that carries the localized property, for example <TextBlock l:LocalizeArgs.Arg0="{Binding PeopleCount}" Text="{l:Localize {x:Static res:StringsKeys.PeopleInvited}}" /> with a resource value such as {0} people invited; the rendered text re-formats live whenever a bound argument or the culture of the ambient Current changes.

public sealed class LocalizeArgs : AvaloniaObject, INotifyPropertyChanged
Inheritance
AvaloniaObject
LocalizeArgs
Implements
Inherited Members
AvaloniaObject.CheckAccess()
AvaloniaObject.VerifyAccess()
AvaloniaObject.ClearValue(AvaloniaProperty)
AvaloniaObject.ClearValue<T>(AvaloniaProperty<T>)
AvaloniaObject.ClearValue<T>(StyledProperty<T>)
AvaloniaObject.ClearValue<T>(DirectPropertyBase<T>)
AvaloniaObject.GetHashCode()
AvaloniaObject.GetValue(AvaloniaProperty)
AvaloniaObject.GetValue<T>(StyledProperty<T>)
AvaloniaObject.GetValue<T>(DirectPropertyBase<T>)
AvaloniaObject.GetBaseValue<T>(StyledProperty<T>)
AvaloniaObject.IsAnimating(AvaloniaProperty)
AvaloniaObject.IsSet(AvaloniaProperty)
AvaloniaObject.SetValue<T>(StyledProperty<T>, T, BindingPriority)
AvaloniaObject.SetValue<T>(DirectPropertyBase<T>, T)
AvaloniaObject.SetCurrentValue<T>(StyledProperty<T>, T)
AvaloniaObject.Bind(AvaloniaProperty, BindingBase)
AvaloniaObject.CoerceValue(AvaloniaProperty)
AvaloniaObject.this[AvaloniaProperty]
AvaloniaObject.this[IndexerDescriptor]
AvaloniaObject.Dispatcher
AvaloniaObject.PropertyChanged

Remarks

While no argument is set on the element, the resource resolves exactly as without this class - no composite formatting runs, so resource values containing literal braces keep working. As soon as at least one argument is set, the resolved value is treated as a composite format string: the arguments Arg0 up to the highest set slot are passed to the formatting ILocalizer.Get overloads, with unset slots below the highest formatting as null. The arguments are per element - two localized properties on the same element share the one argument set.

Fields

Arg0Property

Identifies the LocalizeArgs.Arg0 attached property: format argument {0}.

public static readonly AttachedProperty<object?> Arg0Property

Field Value

AttachedProperty<object>

Arg1Property

Identifies the LocalizeArgs.Arg1 attached property: format argument {1}.

public static readonly AttachedProperty<object?> Arg1Property

Field Value

AttachedProperty<object>

Arg2Property

Identifies the LocalizeArgs.Arg2 attached property: format argument {2}.

public static readonly AttachedProperty<object?> Arg2Property

Field Value

AttachedProperty<object>

Arg3Property

Identifies the LocalizeArgs.Arg3 attached property: format argument {3}.

public static readonly AttachedProperty<object?> Arg3Property

Field Value

AttachedProperty<object>

Arg4Property

Identifies the LocalizeArgs.Arg4 attached property: format argument {4}.

public static readonly AttachedProperty<object?> Arg4Property

Field Value

AttachedProperty<object>

Arg5Property

Identifies the LocalizeArgs.Arg5 attached property: format argument {5}.

public static readonly AttachedProperty<object?> Arg5Property

Field Value

AttachedProperty<object>

Arg6Property

Identifies the LocalizeArgs.Arg6 attached property: format argument {6}.

public static readonly AttachedProperty<object?> Arg6Property

Field Value

AttachedProperty<object>

Arg7Property

Identifies the LocalizeArgs.Arg7 attached property: format argument {7}.

public static readonly AttachedProperty<object?> Arg7Property

Field Value

AttachedProperty<object>

Arg8Property

Identifies the LocalizeArgs.Arg8 attached property: format argument {8}.

public static readonly AttachedProperty<object?> Arg8Property

Field Value

AttachedProperty<object>

Methods

GetArg0(AvaloniaObject)

Gets the value of the Arg0Property attached property.

public static object? GetArg0(AvaloniaObject element)

Parameters

element AvaloniaObject

The element holding the argument.

Returns

object

The argument value, or null when the argument is not set.

GetArg1(AvaloniaObject)

Gets the value of the Arg1Property attached property.

public static object? GetArg1(AvaloniaObject element)

Parameters

element AvaloniaObject

The element holding the argument.

Returns

object

The argument value, or null when the argument is not set.

GetArg2(AvaloniaObject)

Gets the value of the Arg2Property attached property.

public static object? GetArg2(AvaloniaObject element)

Parameters

element AvaloniaObject

The element holding the argument.

Returns

object

The argument value, or null when the argument is not set.

GetArg3(AvaloniaObject)

Gets the value of the Arg3Property attached property.

public static object? GetArg3(AvaloniaObject element)

Parameters

element AvaloniaObject

The element holding the argument.

Returns

object

The argument value, or null when the argument is not set.

GetArg4(AvaloniaObject)

Gets the value of the Arg4Property attached property.

public static object? GetArg4(AvaloniaObject element)

Parameters

element AvaloniaObject

The element holding the argument.

Returns

object

The argument value, or null when the argument is not set.

GetArg5(AvaloniaObject)

Gets the value of the Arg5Property attached property.

public static object? GetArg5(AvaloniaObject element)

Parameters

element AvaloniaObject

The element holding the argument.

Returns

object

The argument value, or null when the argument is not set.

GetArg6(AvaloniaObject)

Gets the value of the Arg6Property attached property.

public static object? GetArg6(AvaloniaObject element)

Parameters

element AvaloniaObject

The element holding the argument.

Returns

object

The argument value, or null when the argument is not set.

GetArg7(AvaloniaObject)

Gets the value of the Arg7Property attached property.

public static object? GetArg7(AvaloniaObject element)

Parameters

element AvaloniaObject

The element holding the argument.

Returns

object

The argument value, or null when the argument is not set.

GetArg8(AvaloniaObject)

Gets the value of the Arg8Property attached property.

public static object? GetArg8(AvaloniaObject element)

Parameters

element AvaloniaObject

The element holding the argument.

Returns

object

The argument value, or null when the argument is not set.

SetArg0(AvaloniaObject, object?)

Sets the value of the Arg0Property attached property.

public static void SetArg0(AvaloniaObject element, object? value)

Parameters

element AvaloniaObject

The element to hold the argument.

value object

The argument value; null is a valid, set value.

SetArg1(AvaloniaObject, object?)

Sets the value of the Arg1Property attached property.

public static void SetArg1(AvaloniaObject element, object? value)

Parameters

element AvaloniaObject

The element to hold the argument.

value object

The argument value; null is a valid, set value.

SetArg2(AvaloniaObject, object?)

Sets the value of the Arg2Property attached property.

public static void SetArg2(AvaloniaObject element, object? value)

Parameters

element AvaloniaObject

The element to hold the argument.

value object

The argument value; null is a valid, set value.

SetArg3(AvaloniaObject, object?)

Sets the value of the Arg3Property attached property.

public static void SetArg3(AvaloniaObject element, object? value)

Parameters

element AvaloniaObject

The element to hold the argument.

value object

The argument value; null is a valid, set value.

SetArg4(AvaloniaObject, object?)

Sets the value of the Arg4Property attached property.

public static void SetArg4(AvaloniaObject element, object? value)

Parameters

element AvaloniaObject

The element to hold the argument.

value object

The argument value; null is a valid, set value.

SetArg5(AvaloniaObject, object?)

Sets the value of the Arg5Property attached property.

public static void SetArg5(AvaloniaObject element, object? value)

Parameters

element AvaloniaObject

The element to hold the argument.

value object

The argument value; null is a valid, set value.

SetArg6(AvaloniaObject, object?)

Sets the value of the Arg6Property attached property.

public static void SetArg6(AvaloniaObject element, object? value)

Parameters

element AvaloniaObject

The element to hold the argument.

value object

The argument value; null is a valid, set value.

SetArg7(AvaloniaObject, object?)

Sets the value of the Arg7Property attached property.

public static void SetArg7(AvaloniaObject element, object? value)

Parameters

element AvaloniaObject

The element to hold the argument.

value object

The argument value; null is a valid, set value.

SetArg8(AvaloniaObject, object?)

Sets the value of the Arg8Property attached property.

public static void SetArg8(AvaloniaObject element, object? value)

Parameters

element AvaloniaObject

The element to hold the argument.

value object

The argument value; null is a valid, set value.