dotnet / dotnet/docs

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

Open
#19,225 1 comment 0 reactions 0 assignees View on GitHub
app-compat/subsvc dotnet-framework/svc
Dominant language
No language data
Stars
4.8k
Forks
6.1k
Avg merge
15h 21m
Merged PRs (30d)
370

Description

### 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](https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/retargeting/4.5-4.6#currentculture-and-currentuiculture-flow-across-tasks) 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**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.