Class Argument

Namespace
RentADeveloper.ResXLocalization.WPF
Assembly
ResXLocalization.WPF.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

string

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 <system:Int32>. A binding must be a plain {Binding}, including ElementName and RelativeSource; a MultiBinding, a PriorityBinding and {DynamicResource} are not supported. A value that is not resolved yet is null.

public object? Value { get; set; }

Property Value

object