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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:56:18+00:00 2026-05-23T09:56:18+00:00

Hii, I am creating a WPF aplication. My home page will look like the

  • 0

enter image description here

Hii,
I am creating a WPF aplication. My home page will look like the one I have shown in the image.
In which i will have following componenents:
1. Topbar
2. Left bar – slide down menu like accordion which will slide down on selection if it has any submenu items otherwise on selection it will show related form.
3. Main panel – in which i will open my child forms
4. Bottom bar.

I would prefer if i get already implemented application that i can reuse in my application, as I think this form is gonna take hell lot of time. And Also as I am new to WPF, I would love to have some guidance about following points

  1. How to make a slide down accordion like menu in WPF, which are also supposed to have submenu in it. ex. Report menu – will have list of all reports in it, which will be displayed when you click on the reports menu. How can I accomplish this in WPF>

  2. How to open child form in right side panel? What controls/components should I use in my form to host child forms?

  3. Any sample applications, web references, or already implemented code will be of great help as I have very strict deadline and dont afford to spend much time in exploring.

  • 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-23T09:56:19+00:00Added an answer on May 23, 2026 at 9:56 am

    Abandon full accordion functionality

    If you can live without a full accordion, you could easily accomplish something similar to what you want by using a TabControl, with alternate layout (TabStripPlacement="Left").

    See this question (the same as in my comments): Create Tabbed Sidebar with sections WPF

    Existing Library

    There are existing WPF control libraries with accordions:

    • WPF Toolkit
    • Telerik Rad controls – http://www.telerik.com/products/wpf.aspx (or silverlight/asp.net MVC, etc)
    • Many others, most of them for money…

    DIY

    You can try using a TreeView to implement your accordion, too. You just need a few tricks up your sleeve to accomplish this:

    First, you need to hide the tree-view buttons. They will mess up what we’re trying to accomplish. See this question – Treeview hide [+] [-] buttons

    Second, you want to ensure that the IsExpanded property is set to true if a TreeViewItem or one of its children is selected, and set to false otherwise. You can do this with a IMultiValueConverter combined with a Style for TreeViewItem.

    <Window x:Class="WpfApplication1.MainWindow"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:local="clr-namespace:WpfApplication1">
    
    <!-- ... -->
    
    <TreeView>
      <TreeView.Resources>
        <local:SelectedItemToIsChildConverter x:Key="isChildConverter" />
        <Style TargetType="{x:Type TreeViewItem}">
          <Style.Setters>
            <Setter Property="IsExpanded">
              <Setter.Value>
                <MultiBinding Converter="{StaticResource isChildConverter}">
                  <Binding Path="SelectedItem"
                    RelativeSource="{RelativeSource AncestorType={x:Type TreeView}}" />
                  <Binding RelativeSource="{RelativeSource Self}" />
                </MultiBinding>
              </Setter.Value>
            </Setter>
          </Style.Setters>
        </Style>
      </TreeView.Resources>
      <!-- Children here, or set ItemsSource property via databinding -->
    </TreeView>
    

    Here’s the code for the converter, in separate CS file:

    public class SelectedItemToIsChildConverter : IMultiValueConverter
    {
        public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            TreeViewItem selectedItem = values.Length > 0 ? values[0] as TreeViewItem : null;
            TreeViewItem targetItem = values.Length > 1 ? values[1] as TreeViewItem : null;
    
            if (targetItem == null)
                return false;
    
            TreeViewItem currentItem = selectedItem;
            while (currentItem != null)
            {
                if (currentItem == targetItem)
                    return true;
                currentItem = currentItem.Parent as TreeViewItem;
            }
    
            return false;
        }
    
        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
    

    After this, you would have to style it to make it look nice, and support animation.

    Once this is all done, use a grid to split up your UI. Use data binding to show content on your main UI area, based off the selected tree view item.

    Edit:

    Actually, a tree view is a poor base for an accordion. I searched a bit for details on accordion controls, and it turns out that they tend to only have one level of hierarchy.

    With this description in mind, it may be easier to use a DataGrid, and take advantage of the RowDetails to expand your accordion view.

    Here’s a brief tutorial: http://www.wpftutorial.net/DataGrid.html#rowDetails

    Just make sure most of the data grid features are disabled.

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

Sidebar

Related Questions

hii every one, following is my code which displays 4 panel one is at
Hi I have a XSL that i'm creating, which looks like this: <xsl:stylesheet version=1.0
Hi i'm creating an app which have shopping cart and payment done via paypal
Hi I am creating a wordpress custom page theme, I have included the code.
hi I am creating firefox plugin.I have created a button image on toolbar in
Hi I creating war aplication with weblogic 11g and I have problem with joda
Hi I am getting the following erro while creating new Account in CRM 2011.
Hi I am creating a method that will take a number and print it
Hi i am creating a email system which works on our devbox but on
Hi I have a list of lists structure like this udbList=[ [132, 2011-11-28 00:00:00.0,

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.