WCF RIA Services Silverlight Business Application, CustomDataForm, OnAutoGeneratingField , . , , , , ReplaceTextBox, . .
public class CustomDataForm : DataForm
{
protected override void OnAutoGeneratingField(DataFormAutoGeneratingFieldEventArgs e)
{
PropertyInfo propertyInfo = this.CurrentItem.GetType().GetProperty(e.PropertyName);
if (e.Field.Content is TextBox && this.IsPasswordProperty(propertyInfo))
{
e.Field.ReplaceTextBox(new PasswordBox(), PasswordBox.PasswordProperty);
}
this.fields[e.PropertyName] = e.Field;
base.OnAutoGeneratingField(e);
}
}