Skip to content

Missing info about flag that controls WPF's Dispatcher Culture behavior #19225

@pawlos

Description

@pawlos

Type of issue

Other (describe below)

Description

I was debugging an issues we had in WPF project after migrating from 4.5 to 4.8 that resulted in application language switching not working correctly. During the debugging, CurrentCulture and CurrentUICulture on System.Threading.CurrentThread were constantly switching back and forth between the new language and the old one.

After debugging discovered there's a flag Switch.MS.Internal.DoNotUseCulturePreservingDispatcherOperations that reverts back the behavior to the old one, but couldn't find it documented in the docs. I only found some mentioned of it in PRs, issues and in code. It would be nice to have it documented so that other doesn't have to the debugging.

Finally we had to also set the flag NoAsyncCurrentCulture which is mentioned in this doc so I'm wondering why the other one is not. Is there any reason this flag is not documented?

Page URL

https://learn.microsoft.com/en-us/dotnet/framework/migration-guide/retargeting/4.6.x

Content source URL

https://github.com/dotnet/docs/blob/live/docs/framework/migration-guide/retargeting/4.6.x.md

Document Version Independent Id

7f031ebd-29b8-2ab5-9630-ffb11838515c

Article author

@gewarren

Metadata

  • ID: cce538cd-8550-f948-cdaa-569c26449a20
  • Service: dotnet-framework
  • Sub-service: app-compat

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions