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 7193091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:05:54+00:00 2026-05-28T20:05:54+00:00

In a WPF app I can move a UserControl from a ContentControl to another

  • 0

In a WPF app I can move a UserControl from a ContentControl to another one in code like this:

myContentControl1.Content = null;
myContentControl2.Content = myUserControl;

The problem is that the UserControl that has been moved is a rather heavy one (consists of a lot of smaller controls). So the above operation takes a significant amount of time, almost as long as when I load the UserControl initially. It seems that every element in that UserControl goes through processing to be moved under another ContentControl.

Is there a more efficient and faster method of placing a UserControl under another parent (in my case a ContentControl) as its child (without the need for UI thread to process all its elements every time)? (Dynamically, in code-behind)

  • 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-28T20:05:55+00:00Added an answer on May 28, 2026 at 8:05 pm

    Instead of switching a ContentControl‘s content between your two UserControl‘s, put both UserControl‘s in a Grid and toggle their Visibility. While showing one with current data, update the other, invisible one in the background. When updating is done, toggle both control’s visibility from Visible to Hidden and vice versa. Don’t use Collapsed, since that would force a new layout cycle.

    Putting both in a Grid without specifying Row or Column makes them lie above each other.

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

Sidebar

Related Questions

I'm hearing this alot, that you can develop an app in WPF and run
When I start a InnoSetup installer from a WPF app, I can't interact with
I'm trying to use WindowsFormsHost in a WPF app so I can use some
In a WPF app, is there a object I can assign to FileSystemWatcher.SynchronizingObject? I
I've got style resources in WPF working so that in my App.xaml I can
I have a Button and a TextBox in my WPF app. How can I
My WPF app can open and edit single documents. I am looking for a
I am working with a non WPF app so I can only create WPF
I wan't to consume a web service inside a WPF app. I can add
How can a WPF app know if its getting remotely operated (via VNC or

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.