FROM:

http://community.devexpress.com/forums/p/62366/211324.aspx

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;
            }
        }
    }

相关文章:

  • 2021-05-28
  • 2022-12-23
  • 2022-02-23
  • 2021-12-28
  • 2021-08-12
  • 2021-06-19
  • 2021-08-12
猜你喜欢
  • 2021-08-29
  • 2022-03-08
  • 2021-11-19
  • 2021-05-21
  • 2021-05-03
  • 2021-12-23
  • 2022-12-23
相关资源
相似解决方案