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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:09:01+00:00 2026-05-19T04:09:01+00:00

I am making an application that connects to our billing software using its API,

  • 0

I am making an application that connects to our billing software using its API, and I am running into a few issues getting the layout working properly.

alt text

I want to make it so that when one of the expanders is minimized, the other window fills the gap, and when it is expanded again the other expander goes back to where it was. Right now when the arrow is clicked on one, there is just an empty gap. I used a DockPanel as the parent which I assumed would automatically do this, but it isn’t working.

Second question, is there a way to make these areas resizable? I don’t want to try and get too frisky with allowing the user to undock the menus (don’t even know if that is possible with just straight WPF) but it would be nice if they could change the width/height of them.

Also, just a newbie question to C#, but what is the equivalent of a C++ header file? It looks like you just use .cs files, but I am not sure. I want to extract all of my functions that pull the data from the billing software and put them into a different file to clean up the code.

Here is my XAML…

<Window x:Class="WpfApplication3.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Billing Management" Height="550" Width="754" xmlns:shared="http://schemas.actiprosoftware.com/winfx/xaml/shared" WindowStartupLocation="CenterScreen" WindowStyle="ThreeDBorderWindow">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="22" />
            <RowDefinition />
        </Grid.RowDefinitions>
        <Menu Height="22" Name="menu1" Margin="0" HorizontalAlignment="Stretch" VerticalAlignment="Top" HorizontalContentAlignment="Left" IsEnabled="True" IsMainMenu="True">
            <MenuItem Header="_File">
                <MenuItem Header="_Open" />
                <MenuItem Header="_Close" />
                <Separator/>
                <MenuItem Header="_Exit" />
            </MenuItem>
        </Menu>
            <TabControl Name="tabControl1" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" BorderThickness="1" Padding="0" TabStripPlacement="Bottom" UseLayoutRounding="False" FlowDirection="LeftToRight" Grid.Row="1">
                <TabItem Header="Main" Name="tabItem1" Margin="0">
                    <DockPanel Name="dockPanel1" LastChildFill="True">
                        <ListBox Height="100" Name="listBox3" DockPanel.Dock="Top" />
                        <ListBox Name="listBox4" Width="200" DockPanel.Dock="Right" />
                        <DockPanel Height="Auto" Name="dockPanel2" Width="Auto" VerticalAlignment="Stretch" LastChildFill="True">
                            <shared:AnimatedExpander Header="Staff Online" Width="200" Name="expanderStaffOnline" IsExpanded="True" Height="194" BorderThickness="0" DockPanel.Dock="Top" VerticalContentAlignment="Stretch">
                                    <ListBox Name="listboxStaffOnline" Width="Auto" Height="Auto" Margin="0" VerticalAlignment="Stretch" Loaded="listboxStaffOnline_Loaded" />
                            </shared:AnimatedExpander>
                            <shared:AnimatedExpander Header="Test Menu 2" Height="Auto" Name="animatedExpander1" BorderThickness="1" Margin="0,0,0,0" IsExpanded="True" VerticalContentAlignment="Stretch">
                                    <ListBox Height="Auto" HorizontalAlignment="Stretch" Name="listBox6" VerticalAlignment="Stretch" Margin="0" BorderThickness="1" />
                            </shared:AnimatedExpander>
                        </DockPanel>
                    <ListBox Height="100" Name="listboxAdminLogs" DockPanel.Dock="Bottom" Loaded="listboxAdminLogs_Loaded" />
                        <ListBox Name="listBox5" />
                    </DockPanel>
                </TabItem>
                <TabItem Header="Support" Name="tabItem2" Margin="0">
                </TabItem>
            <TabItem Header="Clients" />
            <TabItem Header="Billing" />
            <TabItem Header="Orders" />
        </TabControl>
    </Grid>
</Window>
  • 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-19T04:09:01+00:00Added an answer on May 19, 2026 at 4:09 am

    You should place your expanders in a Grid which will allow the content to expand and fill automatically. providing the Row / Column definitions width / height are set to Auto or *.

    If you want to resize you will need to use the GridSplitter; see http://www.wpftutorial.net/GridLayout.html for further details.

    I don’t know C++ so can’t really tell you want the equivalent of header files are but I think what you are trying to do is achievable using partial classes; see http://msdn.microsoft.com/en-us/library/wa80x488(v=vs.80).aspx for further details.

    And finally, to answer your question in your comments; To get a uniform appearance for all controls in WPF you would need to create custom Styles which use a common set of Colors / Brushes.

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

Sidebar

Related Questions

OK, say that my application is emitting (x86) instructions into memory, making the page
I have a flash application that connects to a users webcam using public static
I am making an application that does some custom image processing. The program will
I'm making a WPF application that is comprised of Screens (Presenter + View). I
I am developing a cocoa application that will be making heavy use of both
Where is a good place to start with making an application in .NET that
I'm making a php web application which stores user specific information that is not
I am making a screen cast nor capture of the functionality of our application.I
I'm trying to make a MFC application(client) that connects to a server on (localhost,port
I am making a PHP tool that connects to a repository, downloads the list

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.