0

I am developing a C# windows forms application that supports multiple languages. When I change the language to Arabic, everything must be from right to left. this causes a flickering problem in my form. Any ideas on how to fix that? This the code I am using:

 private void arabicSAToolStripMenuItem_Click(object sender, EventArgs e)
    {
       
        Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("ar-SA");
        reset();           
        tabPatientCard.RightToLeft = RightToLeft.Yes;
        tabs.RightToLeft = RightToLeft.Yes;
        paneltabs.Dock = DockStyle.Right;

    }
  • You should look at [that](https://stackoverflow.com/a/8074084/13664939) answer. – gurkan Jun 08 '21 at 10:35
  • You could try suspending the drawing - what usually happens is that rendering happens as soon as text is changed because the change invalidates the drawing area/rect of the control. If you defer rendering, you can make a load of changes that will all be rendered together. See here: https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.control.suspendlayout?view=net-5.0 – Charleh Jun 08 '21 at 12:18
  • The easiest way is to restart the app when you need to change the layout. `Application.Restart();`. – dr.null Jun 08 '21 at 18:34

0 Answers0