Skip to content

Style "MaterialDesignIconForegroundButton" doesn't set RippleAssist.Feedback #2884

@reiseder

Description

@reiseder

Bug explanation

I have noticed that some button styles including MaterialDesignIconForegroundButton don't set the RippleAssist.Feedback property. This means you can change the Foreground property but the color of the ripple will always be what is set in the theme. In case of the MaterialDesignIconForegroundButton it will always be PrimaryHueMidBrush of the MaterialDesignFlatButton even though Foreground is set to a secondary color.

RippleAssist.Feedback set in MaterialDesignFlatButton

MaterialDesignIconForegroundButton doesn't set RippleAssist.Feedback

MaterialDesignPaperLightButton sets RippleAssist.Feedback

I don't know if this is the expected behavior but shouldn't this be added to the "Foreground" buttons?

<Style x:Key="MaterialDesignIconForegroundButton" TargetType="{x:Type ButtonBase}" BasedOn="{StaticResource MaterialDesignIconButton}">
    <Setter Property="Foreground" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(TextElement.Foreground)}"/>
    <Setter Property="wpf:RippleAssist.Feedback" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(TextElement.Foreground)}"/>
</Style>

Version

4.6.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugevaluation requiredItems is pending review or evaluation by the team

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions