Skip to content

Removing chevron icon from MaterialDesignExpander template clone doesn't work #2920

@LyndonGingerich

Description

@LyndonGingerich

Bug explanation

Reproduction:

  1. Create WPF project with dependency on MaterialDesignThemes; add ResourceDictionary to App.xaml
  2. Clone ExpanderRotateAngleConverter
  3. Clone MaterialDesignExpander from the latest commit as of this post, using aforementioned clone of ExpanderRotateAngleConverter
  4. Add an expander to MainWindow.xaml
  5. Remove Style of MaterialDesignHorizontalHeaderStyle from ToggleButton in the Template setter

Expected behavior: The expander no longer contains a chevron icon.
Actual behavior: The chevron icon persists.

Now, if I remove the style setters from ControlTemplate.Triggers as well, then the expander successfully reverts to looking horrible, but this discovery took a long time.

Could MaterialDesignExpander be rearranged so the triggers don't override my styling?

The attached reproduction uses BasedOn to eliminate non-template setters.

ExpanderWithoutChevron.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions