This question is locked. New answers and comments are not allowed.
Hi,
I've just installed trial of Windows Phone Controls. I'm trying to use localized string in watermark of DataField.
Here is XAML from your template:
I'm trying to localize:
and
But when I'm trygin to do something like this:
I've got an exception:
I think it's because in XAML I can't use "Binding" in "Value" attribute of style setter in this place.
What are best practices to localize watermarks in such places?
I've just installed trial of Windows Phone Controls. I'm trying to use localized string in watermark of DataField.
Here is XAML from your template:
<
telerikInput:RadDataForm
Grid.Row
=
"1"
Margin
=
"12,48,12,0"
x:Name
=
"DataForm"
>
<
telerikInput:RadDataForm.CurrentItem
>
<
models:SignInDataModel
/>
</
telerikInput:RadDataForm.CurrentItem
>
<
Grid
>
<
telerikInput:DataField
Header
=
""
TargetProperty
=
"UserName"
>
<
telerikInput:DataField.EditorStyles
>
<
Style
TargetType
=
"telerikPrimitives:RadTextBox"
>
<
Setter
Property
=
"Watermark"
Value
=
"login"
/>
</
Style
>
</
telerikInput:DataField.EditorStyles
>
<
telerikInput:DataField.Validators
>
<
telerikInput:NonEmptyStringValidator
/>
</
telerikInput:DataField.Validators
>
</
telerikInput:DataField
>
<
telerikInput:DataField
Header
=
""
TargetProperty
=
"Password"
telerikDataForm:PasswordField.IsPasswordField
=
"True"
>
<
telerikInput:DataField.EditorStyles
>
<
Style
TargetType
=
"telerikPrimitives:RadPasswordBox"
>
<
Setter
Property
=
"Watermark"
Value
=
"password"
/>
</
Style
>
</
telerikInput:DataField.EditorStyles
>
<
telerikInput:DataField.Validators
>
<
telerikInput:NonEmptyStringValidator
/>
</
telerikInput:DataField.Validators
>
</
telerikInput:DataField
>
</
Grid
>
</
telerikInput:RadDataForm
>
I'm trying to localize:
<
Setter
Property
=
"Watermark"
Value
=
"login"
/>
and
<
Setter
Property
=
"Watermark"
Value
=
"password"
/>
But when I'm trygin to do something like this:
<
Setter
Property
=
"Watermark"
Value
=
"{Binding Source={StaticResource LocalizedStrings}, Path=AppResources.Login}"
/>
I've got an exception:
ArgumentException: Value does not fall within the expected range.
I think it's because in XAML I can't use "Binding" in "Value" attribute of style setter in this place.
What are best practices to localize watermarks in such places?