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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T06:01:46+00:00 2026-06-11T06:01:46+00:00

I am trying to create an accordion style menu in WPF using Expanders and

  • 0

I am trying to create an accordion style menu in WPF using Expanders and StackPanels.

I would like to be able to click on the Expander Header and show the StackPanel without showing the Arrow. This is working when I click on the Arrow, however I would like to remove the Arrow.

When I remove the ‘Arrow’ properties from the Expander’s ToggleButton the ToggleButton is a small area below the Content Presenter difficult for the user to click.

Is there a way to make the entire Header of the Expander (including the Text) be the ToggleButton?

In the Expander’s template I have the following:

<ToggleButton IsChecked="{Binding Path=IsExpanded,Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" 
                                              OverridesDefaultStyle="True"  Template="{StaticResource ExpanderToggleButton}" Background="{StaticResource NormalBrush}" 
                                              Height="25">
                                </ToggleButton>
                                <ContentPresenter Margin="4" ContentSource="Header" RecognizesAccessKey="True" />

and in ‘ExpanderToggleButton’:

<ControlTemplate x:Key="ExpanderToggleButton" TargetType="ToggleButton">
        <Border Name="Border" CornerRadius="2,0,0,0" Background="Transparent" BorderBrush="{StaticResource NormalBorderBrush}" BorderThickness="0,0,1,0">
        </Border>
        <ControlTemplate.Triggers>
            <Trigger Property="ToggleButton.IsMouseOver" Value="true">
                <Setter TargetName="Border" Property="Background" Value="Red" />
            </Trigger>
            <Trigger Property="IsPressed" Value="true">
                <Setter TargetName="Border" Property="Background" Value="{StaticResource PressedBrush}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter TargetName="Border" Property="Background" Value="{StaticResource DisabledBackgroundBrush}" />
                <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DisabledBorderBrush}" />
                <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
  • 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-11T06:01:48+00:00Added an answer on June 11, 2026 at 6:01 am

    Specify the header template separately like;

    <Expander>
      <Expander.Header>
        .... (This is where your toggle button currently sits any way in a default template)
      </Expander.Header>
      <Expander.Content>
        ....
      </Expander.Content>
    </Expander>
    

    This way your header template should receive the Mouse Down event the same as your toggle button would and it applies over the content shown in your header.

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

Sidebar

Related Questions

I'm trying to create an accordion type menu using the following JQUERY: function initMenu()
I am trying to create a jquery accordion that fades the header of the
I am a Jquery noob. I and am trying to create an accordion menu.
I'm trying to create a custom accordion using jquery, have read through quite a
Im trying to create a custom horizontal accordion style showcase. In terms of actual
I'm trying to create a horizontal accordion menu in mootools, instead of the standard
I'm trying to create an effect similar to the accordion. However, when header 'A'
I am trying to create a Outlook style accordion for my page. The problem
I'm trying to create a nested navigation accordion using the UI. (There's lots of
I'm trying to create an accordion like blog function, where at first you see

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.