Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 360933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T12:32:10+00:00 2026-05-12T12:32:10+00:00

Im trying to set Language for System.Windows.Control.RichTextBox as es-PE, but I found some issues,

  • 0

Im trying to set Language for System.Windows.Control.RichTextBox as “es-PE”, but I found
some issues, for example in some computers, works perfectly and SpellChecker is enabled
with “es-PE” language, but in others it just works with “en-US”, so I Dont know whats the matter with
that control, I was using the following code in XAML and C# :

this is code when users select row from GridView and then shows the screenshot attached

 private void dlstInformes_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            if (!dlstInformes.SelectedItem.ToString().Equals(""))
            {
                var source_ = dlstInformes.SelectedItems;
                InformeMedico demo = new InformeMedico(); //New Window

                foreach (informeMedico item in source_)
                {
                    numeroinforme = item.numeroinforme.ToString();
                    nombreinforme = item.nombreinforme;
                    fechainforme = item.fechainforme.ToString();
                    nombreMedico = item.medicoCompleto.ToString();
                    turnoMedico = item.turno.ToString();
                    nombrePaciente = item.pacienteCompleto.ToString();
                    nombreExamen = item.nombreinforme.ToString();

                }
                demo.Language = XmlLanguage.GetLanguage("es-PE");
                demo.txtNombreExamen.Text = nombreinforme;
                demo.lblNroInforme.Content = numeroinforme;
                demo.lblMedicoNombre.Content = nombreMedico;
                demo.lblNombrePac.Content = nombrePaciente;
                demo.lblTurnoMedico.Content = turnoMedico;
            using (DB db = new DB())
            {
                var lstTM = (from ea in db.EXAMENXATENCIONs where ea.turnomedico.Trim() != " " select ea.turnomedico).Distinct().ToList();
                string tm = (from ea in db.EXAMENXATENCIONs where ea.codigo == Convert.ToInt32(numeroinforme) select ea.turnomedico).FirstOrDefault();
                demo.cboTurnoMed.ItemsSource = lstTM;
                demo.cboTurnoMed.SelectedItem = tm;
                demo.cboTurnoMed.SelectedValue = tm;
                demo.cboTurnoMed.Text = tm;
                if (tm.Equals("RE/ES") || tm.Equals("RE/HS") || tm.Equals("RE/HT") || tm.Equals("RE/KV") || tm.Equals("HH/CS") || tm.Equals("HH/ES") || tm.Equals("HH/HS") || tm.Equals("HH/HT") || tm.Equals("HH/KV"))
                {
                    demo.FirmaUnoDefault.Content = "DEN51";
                    demo.FirmaDosDefault.Content = tm;
                }
                else if (tm.Equals("HH/AO") || tm.Equals("IU/AO") || tm.Equals("RE/AO") || tm.Equals("HH/JA") || tm.Equals("RR/JA") || tm.Equals("IU/JA"))
                {
                    demo.FirmaUnoDefault.Content = "DEN51";
                    demo.FirmaDosDefault.Content = "AOY20";
                }
                else if (tm.Equals("IU/CS") || tm.Equals("IU/ES") || tm.Equals("IU/HT") || tm.Equals("IU/KV"))
                {
                    demo.FirmaUnoDefault.Content = "IUU17";
                    demo.FirmaDosDefault.Content = tm;
                }
                else if (tm.Equals("RD/DE"))
                {
                    demo.FirmaUnoDefault.Content = "REE";
                    demo.FirmaDosDefault.Content = "DEN51";
                }
                else if (tm.Equals("RE/JC"))
                {
                    demo.FirmaUnoDefault.Content = "REE";
                    demo.FirmaDosDefault.Content = "JCCH25";
                }
                else if (tm.Equals("RE/CS"))
                {
                    demo.FirmaUnoDefault.Content = "DEN51";
                    demo.FirmaDosDefault.Content = "REE";
                }
            }
            demo.lblCodigoClase.Visibility = Visibility.Hidden;
            demo.lblCodigoEstudio.Visibility = Visibility.Hidden;
            demo.lblCodigoPaciente.Visibility = Visibility.Hidden;
            demo.FirmaUnoDefault.Visibility = Visibility.Hidden;
            demo.FirmaDosDefault.Visibility = Visibility.Hidden;
            demo.rtbHallazgo.Language = XmlLanguage.GetLanguage("es-PE");
            demo.rtbConclusion.Language = XmlLanguage.GetLanguage("es-PE");
            demo.rtbTecnica.Language = XmlLanguage.GetLanguage("es-PE");

            demo.rtbHallazgo.SpellCheck.IsEnabled = true;
            demo.rtbTecnica.SpellCheck.IsEnabled = true;
            demo.rtbConclusion.SpellCheck.IsEnabled = true;
            demo.rtbConclusion.SpellCheck.SpellingReform = SpellingReform.PreAndPostreform;

            demo.ResizeMode = ResizeMode.NoResize;

            demo.Closing += new System.ComponentModel.CancelEventHandler(notClosing_CancelEventArgs);

            demo.ShowDialog();
        }
        else
        {
            MessageBox.Show("Seleccione un item", "Error", MessageBoxButton.OK, MessageBoxImage.Asterisk);
        }
    }

alt text

I also trying configurate and removing “en-US” language from SO, when it happens spellchecker stop completly and when I Re-Add that language for keyboard, it SpellChecker reappears.

Stills not working with “es-PE” or just Spanish as Parent

Thanks in Advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T12:32:10+00:00Added an answer on May 12, 2026 at 12:32 pm

    I’m not sure if this will help, but it might be worth a shot.

    In the Application.StartUp event add the following code

    FrameworkElement.LanguageProperty.OverrideMetadata(
                typeof(FrameworkElement),
                new FrameworkPropertyMetadata(
                    XmlLanguage.GetLanguage(
                    CultureInfo.CurrentCulture.IetfLanguageTag)));
    

    Or you can modify it to specify es-PE instead of the current culture.

    This post might provide more in-depth details: Getting a WPF application to pick up the correct regional settings

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 282k
  • Answers 282k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Unfortunately this is a known bug, there is nothing you… May 13, 2026 at 4:08 pm
  • Editorial Team
    Editorial Team added an answer I never tested it, but this looks quite promising: Minify May 13, 2026 at 4:08 pm
  • Editorial Team
    Editorial Team added an answer The wrong way to do it is create a Process… May 13, 2026 at 4:08 pm

Related Questions

I can't seem to get a custom action working. I might be doing this
So, I'm trying to stub a database connector in order to write tests for
I'm trying to make my application support multiple languages. I've made some satellite assemblies
I'm trying to devise a method that will be able to classify a given

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.