Class Argument
- Namespace
- RentADeveloper.ResXLocalization.Avalonia
- Assembly
- ResXLocalization.Avalonia.dll
One format argument of LocalizeExtension, written as an <l:Argument> child
element:
<l:Localize Key="{x:Static res:StringsKeys.PeopleInvited}"><l:Argument Value="{Binding PeopleCount}" /></l:Localize>.
public sealed class Argument
- Inheritance
-
Argument
- Inherited Members
Remarks
Argument declares an argument. At each conversion it becomes a
MessageArgument whose position is its index among the
<l:Argument> children, with its Name and the resolved Value -
what the formatter receives. The code counterpart is MessageArguments.FromTuples, with a
null name for an unnamed argument (or MessageArguments.FromValues without
names).
Properties
Name
Gets or sets the name of the argument. Unset, the argument is positional only. Set, the argument is also available under this name to a formatter that understands names, such as ICU MessageFormat; the default formatter ignores names and uses the position.
public string? Name { get; set; }
Property Value
Value
Gets or sets the value of the argument: a constant or a binding. Constants are a literal
(Value="Text", which is the string "Text"), {x:Static}, {StaticResource},
{x:Null} or a typed property element such as <x:Int32>. A binding is any Avalonia
binding, for example {Binding PeopleCount}, {CompiledBinding} or
{DynamicResource}. A value that is not resolved yet is null.
[AssignBinding]
public object? Value { get; set; }