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

  • SEARCH
  • Home
  • 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 7807985
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T03:01:13+00:00 2026-06-02T03:01:13+00:00

The following program locks up reproducibly whenever the user changes the keyboard layout via

  • 0

The following program locks up reproducibly whenever the user changes the keyboard layout via a key combination. It does not lock up if the keyboard layout is changed via the tray applet. It does not lock up when changing the layout to English. It does not lock up if the Task never executes.

XAML:

<StackPanel>
    <TextBox></TextBox>
    <Button Click="Button_Click">Click me</Button>
</StackPanel>

C#:

private void Button_Click(object sender, RoutedEventArgs e)
{
    Task.Factory.StartNew(() =>
    {
        var visual = new DrawingVisual();
        using (var context = visual.RenderOpen())
        {
        }
    });
}

Before the button click, I can switch keyboard layouts as I please. After the click the program locks up on the first attempt to switch layouts.

Importantly, this bug only occurs if the layouts are switched via Alt+Shift+2 or Ctrl+Shift+2 (and 3, but not 1).

It’s way, way too late to avoid the use of DrawingVisual on background threads. This has become an integral, core feature of the product. Any ideas for how to work around this are very welcome.

This bug reproduces on .NET 4.0, Win7 32-bit and 64-bit.

Bounty: this bug affects few people in terms of percentage, but those it does affect will constantly cause the lock-up (with the corresponding data loss) every time they habitually change the keyboard layout via the shortcut. I’d like a work-around which does not change the fact that some visuals are rendered on a separate thread.

  • 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-06-02T03:01:16+00:00Added an answer on June 2, 2026 at 3:01 am

    Official Microsoft answer:

    This issue will no[t] be addressed in the next release of WPF. -WPF Team.

    I’m guessing they’re all too busy with WinRT and WPF is on the back burner.

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

Sidebar

Related Questions

The following program compiles with ifort (version 12) but not with GFortran (up to
The following program used the implementation of atomic locks from 'Cuda By Example', but
Does @synchronized not use lock and unlock to achieve mutual exclusion? How does it
Following program looks pretty OK to me. But I can not get it compiled.
I have a program that looks like the following: double[4][4] startMatrix; double[4][4] inverseMatrix; initialize(startMatrix)
The following program has been running for about ~22 hours on two files (txt,
Consider following program: static void Main (string[] args) { int i; uint ui; i
In following program . I have one doubt. I have declared one global variable
The following program is a basic linked list divided in 3 classes. In the
The following program doesn't build in VS11 beta, gcc 4.5, or clang 3.1 #include

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.