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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:03:31+00:00 2026-05-18T00:03:31+00:00

I made some HeaderTemplate for Combobox.GroupStyle in order to display items in groups. And

  • 0

I made some HeaderTemplate for Combobox.GroupStyle in order to display items in groups. And know I need to do some operations with the Combobox when user clicks on the GroupHeader. I have tried to write a trigger in my HedaerTemplate for Combobox.GroupStyle, but it doesn’t work. Below is full code of the combobox:

<ComboBox x:Name="comboBox" DisplayMemberPath="Type"
              HorizontalAlignment="Center" VerticalAlignment="Top"
              Margin="5" MinWidth="100">
        <ComboBox.GroupStyle>
            <GroupStyle>
                <GroupStyle.HeaderTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding Path=Name}"
                                   FontWeight="Bold"
                                   Margin="0,5,0,0"
                                   Padding="3" Background="LightGreen" MouseDown="TextBlock_MouseDown">
                        </TextBlock>
                        <DataTemplate.Triggers>
                            <EventTrigger RoutedEvent="TextBlock.MouseDown">
                                <EventTrigger.Actions>
                                    <BeginStoryboard>
                                        <Storyboard>
                                           <DoubleAnimation Storyboard.Target="{Binding  RelativeSource ={RelativeSource TemplatedParent}}"
                                                             From="0" Storyboard.TargetProperty="Width"
                                                                To="300" Duration="0:0:5"/>
                                        </Storyboard>
                                    </BeginStoryboard>
                                </EventTrigger.Actions>
                            </EventTrigger>
                        </DataTemplate.Triggers>
                    </DataTemplate>

                </GroupStyle.HeaderTemplate>
            </GroupStyle>
        </ComboBox.GroupStyle>
     </ComboBox>

I took the property “Width” just for example. But it didn’t work right. Animation expands GroupHeader, not entire ComboBox.

  • 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-18T00:03:31+00:00Added an answer on May 18, 2026 at 12:03 am

    Your TemplateBinding binds to the item where the template is applied to, i.e., the header. Perhaps you need to set the binding as

    {Binding RelativeSource={RelativeSource FindAncestor, AncestorType=ComboBox}}
    

    ?

    (Sorry, didn’t try the code myself.)

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

Sidebar

Related Questions

i made some mistakes and need to know if can solve it :( look
I made some pages in Wordpress and displayed a navigation so the user can
I made some unit-tests using fest , now I need to run mvn my
I made some cpp app that make statistics on i/o operations on external sd
I made some changes to a project that I need to take out. The
I made some template changes to Magento's New Order transactional email template in the
I made some custom controls in Expression Blend 4 using WPF. However, I need
Problem: user made some selection in the multi-selection listbox, then pressed a checkbox, and
I have made some static functions in order to call them without making any
I made some little programs with Swing-components in JRuby. Now I want to convert

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.