Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expander HeaderTemplate not working #4398

Closed
tedypranolo opened this issue Jul 29, 2020 · 3 comments · Fixed by #6639
Closed

Expander HeaderTemplate not working #4398

tedypranolo opened this issue Jul 29, 2020 · 3 comments · Fixed by #6639

Comments

@tedypranolo
Copy link

Expander has a HeaderTemplate, but I notice it is not actually applied to the ToggleButton.ContentTemplate that displays the header
Default theme

 <Style Selector="Expander[ExpandDirection=Down]">
    <Setter Property="Template">
      <ControlTemplate>
        <Border Background="{TemplateBinding Background}">
          <Grid RowDefinitions="Auto,*">
            <ToggleButton Name="PART_toggle" Grid.Row="0"  Content="{TemplateBinding Header}" IsChecked="{TemplateBinding IsExpanded, Mode=TwoWay}" />
            <ContentPresenter Name="PART_ContentPresenter"
                              Grid.Row="1"
                              IsVisible="{TemplateBinding IsExpanded}"
                              ContentTemplate="{TemplateBinding ContentTemplate}"
                              Content="{TemplateBinding Content}"
                              HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                              VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                              Padding="{TemplateBinding Padding}" />
          </Grid>
        </Border>
      </ControlTemplate>
    </Setter>
  </Style>
@SCLDGit
Copy link

SCLDGit commented Sep 4, 2021

Any progress on this?

@maxkatz6
Copy link
Member

Can be easily fixed by adding missing content template, if somebody wants to contribute.

@Takoooooo
Copy link
Contributor

I would like to clarify.It doesn't work only in simple theme

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants