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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:49:41+00:00 2026-05-13T22:49:41+00:00

I have WPF Application where I have One main form and other user controls

  • 0

I have WPF Application where I have One main form and other user controls are shown in the main form as child form. I have to show Busy bar when I make Async call to data base. What is the best way to declare Busy bar object and then used in every child user control. Should I need to declare busy bar object in the main Form and then Used it the child user control or The App file is best, or is there any good way.

  • 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-13T22:49:41+00:00Added an answer on May 13, 2026 at 10:49 pm

    It depends on whether your “busy bar” is a control that appears inside other controls or windows, or a popup window in its own right.

    If it’s a control, you cannot (easily) use a single control instance in multiple places in the application. A WPF control instance is part of a visual and logical tree. It cannot be part of two visual trees. You can create a BusyBar control class, and declare multiple instances of that in the various places you need it: to do this, use the User Control (WPF) or Custom Control (WPF) template in Visual Studio.

    If it’s a window, you can create it during application startup but leave it hidden. Then you can show it from code when required (using the Show or ShowDialog method). That said, it’s not clear why you’d need this to be a singleton anyway. Creating windows is cheap, especially compared to calls across a network to a database. Again, declaring a class, and creating and showing instances of the class when required, would be the more usual approach. You could easily create a static method to encapsulate the “create-bind-show-wait-hide” cycle so as not to pollute your app code with the details.

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

Sidebar

Related Questions

I have WPF application with one main window . In this window there are
I'm writing an application in WPF. I have one main thread and another one
I have a WPF application with the main Window class called MainWindow. Since I
I have a C# WPF application using a rather noddy MVVM approach. In one
I have a WPF database viewer application: It's a simple main window containing a
I have a WPF-application with a mainwindow and different pages. On one of the
I have a wpf-mvvm application. I have one textbox and one button (similar to
I have a WPF application in VS 2008 with some web service references. For
I have a WPF application that runs fine under XP as an administrator. When
I have a WPF application using Aero Glass. When using the application under a

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.