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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T05:01:27+00:00 2026-06-12T05:01:27+00:00

I have a WPF application that I need to move to a tray. It

  • 0

I have a WPF application that I need to move to a tray. It currently starts directly in the UI, and there are two tabs. On the second tab, there are a couple collapsible containers that hold settings for associated devices. Devices can be added or removed dynamically.

I have added the tray app, and added code to call the settings from the app. Everything works properly except the collapsible containers are empty. I’ve traced the code to confirm that they should have objects in them.

I find it odd that they work if I set the default application to the UI, but they do not work when starting the UI from the tray. I have included a section of the xaml below:

<c:CollapsibleSection Header="Senders">
        <c:CollapsibleSection.CollapsedContent>
             <c:RepeatControl Margin="30,0,0,0" ItemsSource="{Binding SendersList}"  
                              ItemType="{x:Type m:Sender}"  List="{Binding SendersList}"  
                              ItemTemplate="{StaticResource SenderSummary}"/>
        </c:CollapsibleSection.CollapsedContent>
        <Border BorderThickness="1" BorderBrush="Chocolate" Margin="30,0,0,0">
            <c:RepeatControl  ItemsSource="{Binding SendersList}"  ItemType="{x:Type m:Sender}" List="{Binding SendersList}"  ItemTemplate="{StaticResource SenderTemplate}"/> 
        </Border>
    </c:CollapsibleSection>

I am not very familiar with WPF, and was wondering if there was a good method for debugging the xaml in VS 2008. I have found tools in 2010 and 2012, and a few old posts for 2005 that give basic work-arounds, but am not finding much on 2007.

I am also hopeful that someone might know what might cause it to work properly when the UI is started as the Startup Project, but not when being called from another project. The project was initially developed as the UI being the Startup Project, and the tray is a separate project, if that helps any. The UI is also made up of several classes that reside in both the main project folder and a UI folder. However, it seems that all xaml is being accessed (other parts of the class that has the CollapsibleSection are created).

There are no exceptions thrown.

ADDITIONAL INFORMATION

I also tried adding a test-textblock to see if unbound text would appear in a sender, but still nothing displayed. The added code is below:

    <TextBlock Name="testTextBlock">
    <ContentControl Content="This is just a test...  " Foreground="Red">/ContentControl>
</TextBlock>

Thanks for any assistance.

  • 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-12T05:01:29+00:00Added an answer on June 12, 2026 at 5:01 am

    I finally figured this one out. Instead of instantiating the UI, the entire WPF application must be called to run. This will cause the App.xaml to load the dictionary, and other WPF forms can then access it. This is done with the following code:

        private void settingsEvent_Click(object sender, EventArgs e)
        {
            app.InitializeComponent();
            gui = new Sender_Receiver.mainWindow();
        }
        private static App app = new App();
    

    This was discovered through experimentation, so i am sure it is not the best practice, but it works, and right now, that was what I needed.

    Thank you, Blam, for your contributions! I did find them helpful.

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

Sidebar

Related Questions

I have a wpf application that is leaking memory...is there a way to detect
I have a WPF application that I need to have users access directories in.
I have a WPF application in C# that may need to be localized in
I have a WPF application from a client that I need to add a
I have created a WPF application that connects to a SQL Server database directly
I have WPF C# application that communicate with a PLC (i.e. write/read Omron PLC's
I have a WPF application that includes buttons with PNG images. The actual images
We have a WPF Application that runs from both desktop and as a XBAP
I have a WPF application that is a fullscreen kiosk app. It's actually a
I have a WPF application that's crashing once I get it onto machines that

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.