FROM:
Hi,
Does anyone know of an easy way to enforce upper case for ALL text editors in code?
Regards
Dennis
Too late?
This code will work for WindowsForms only...
public partial class UpperCaseViewController : ViewController
{
public UpperCaseViewController()
{
InitializeComponent();
RegisterActions(components);
}
protected override void OnActivated()
{
base.OnActivated();
View.ControlsCreated += new EventHandler(View_ControlsCreated);
}
void View_ControlsCreated(object sender, EventArgs e)
{
if (View is DetailView)
{
foreach (DetailViewItem editor in (View as DetailView).Items)
if (editor.Control is TextEdit)
(editor.Control as TextEdit).Properties.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
}
}
}