• <bdo id='9L6Co'></bdo><ul id='9L6Co'></ul>

      <tfoot id='9L6Co'></tfoot><legend id='9L6Co'><style id='9L6Co'><dir id='9L6Co'><q id='9L6Co'></q></dir></style></legend>
    1. <small id='9L6Co'></small><noframes id='9L6Co'>

    2. <i id='9L6Co'><tr id='9L6Co'><dt id='9L6Co'><q id='9L6Co'><span id='9L6Co'><b id='9L6Co'><form id='9L6Co'><ins id='9L6Co'></ins><ul id='9L6Co'></ul><sub id='9L6Co'></sub></form><legend id='9L6Co'></legend><bdo id='9L6Co'><pre id='9L6Co'><center id='9L6Co'></center></pre></bdo></b><th id='9L6Co'></th></span></q></dt></tr></i><div id='9L6Co'><tfoot id='9L6Co'></tfoot><dl id='9L6Co'><fieldset id='9L6Co'></fieldset></dl></div>
      1. 如何在 WPF 应用程序中全局设置文化?

        时间:2023-08-25

        <small id='7dLBY'></small><noframes id='7dLBY'>

      2. <i id='7dLBY'><tr id='7dLBY'><dt id='7dLBY'><q id='7dLBY'><span id='7dLBY'><b id='7dLBY'><form id='7dLBY'><ins id='7dLBY'></ins><ul id='7dLBY'></ul><sub id='7dLBY'></sub></form><legend id='7dLBY'></legend><bdo id='7dLBY'><pre id='7dLBY'><center id='7dLBY'></center></pre></bdo></b><th id='7dLBY'></th></span></q></dt></tr></i><div id='7dLBY'><tfoot id='7dLBY'></tfoot><dl id='7dLBY'><fieldset id='7dLBY'></fieldset></dl></div>

              <legend id='7dLBY'><style id='7dLBY'><dir id='7dLBY'><q id='7dLBY'></q></dir></style></legend>
                  <tbody id='7dLBY'></tbody>
                  <bdo id='7dLBY'></bdo><ul id='7dLBY'></ul>
                • <tfoot id='7dLBY'></tfoot>
                  本文介绍了如何在 WPF 应用程序中全局设置文化?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我想根据用户偏好将 WPF 应用程序的文化设置为特定的.

                  I would like to set the Culture of a WPF application to a specific one based on user preferences.

                  我可以通过 Thread.CurrentThread.Current(UI)Culture 为当前线程执行此操作,但有没有办法为应用程序全局执行此操作(因此默认情况下它会影响所有线程)?

                  I can do this for the current thread via Thread.CurrentThread.Current(UI)Culture, but is there any way to do this globally for the application (so it affects all threads by default)?

                  推荐答案

                  没有办法为应用程序中的所有线程设置它,但是如果您在应用程序中创建线程,您可以自己为每个人设置文化正如你上面提到的

                  there is no way to set it for all threads in the application, however if you are creating the threads in your application you can set the culture for everyone by yourself as you mentioned above

                  要将 Culture 设置为 Main Application,请使用以下代码段:

                  To set the Culture to the Main Application use the following snippet code:

                  Dim newCulture As CultureInfo = new CultureInfo("fr-FR")
                  CurrentThread.CurrentCulture = newCulture
                  

                  这篇关于如何在 WPF 应用程序中全局设置文化?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:Aspnet Core 十进制绑定不适用于非英语文化 下一篇:如何修复有小数分隔符问题的应用程序

                  相关文章

                  最新文章

                  <legend id='blmu7'><style id='blmu7'><dir id='blmu7'><q id='blmu7'></q></dir></style></legend>
                    • <bdo id='blmu7'></bdo><ul id='blmu7'></ul>

                      <small id='blmu7'></small><noframes id='blmu7'>

                    1. <i id='blmu7'><tr id='blmu7'><dt id='blmu7'><q id='blmu7'><span id='blmu7'><b id='blmu7'><form id='blmu7'><ins id='blmu7'></ins><ul id='blmu7'></ul><sub id='blmu7'></sub></form><legend id='blmu7'></legend><bdo id='blmu7'><pre id='blmu7'><center id='blmu7'></center></pre></bdo></b><th id='blmu7'></th></span></q></dt></tr></i><div id='blmu7'><tfoot id='blmu7'></tfoot><dl id='blmu7'><fieldset id='blmu7'></fieldset></dl></div>
                      <tfoot id='blmu7'></tfoot>