Hi, I am creating a project using the valiadtion as IDataErrorInfo, but I need to create a simple edit form that the RadMaskedTextInput components have the Value option filled with a value.
This is my example TextInput:
<telerik:RadMaskedTextInput Value="{Binding Interessado, Mode=TwoWay, ValidatesOnDataErrors=True, NotifyOnValidationError=True, ValidatesOnExceptions=True}"
x:Name="Interessado"
EmptyContent="Nome ou razão social"
Culture="pt-BR"
Mask=""
InputBehavior="Insert"
UpdateValueEvent="PropertyChanged"
HorizontalAlignment="Stretch"/>
And this is my validation class:
public class Validations : IDataErrorInfo
{
public string Interessado { get; set; }
#region IDataErrorInfo
public string this[string columnName]
{
get
{
if ("Interessado" == columnName)
{
if (String.IsNullOrEmpty(Interessado))
{
return "Campo Nome do Interessado é obrigatório!";
}
}
return "";
}
}
public string Error
{
get { throw new NotImplementedException(); }
}
}
So, how can I set the Value with a text (because I am using the Value option for Binding)?