Skip to content

Setting PopupBox.Opened via Style-EventSetter fails #3090

@greuelpirat

Description

@greuelpirat

Bug explanation

the following style

<Style TargetType="materialDesign:PopupBox" BasedOn="{StaticResource MaterialDesignPopupBox}">
    <EventSetter Event="Opened" Handler="OnPopupBoxOpened" />
</Style>

fails because of strict type check:
https://github.com/dotnet/wpf/blob/01559f6a23310e1361adbc8916909088b7a45ce0/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/EventSetter.cs#L115

because the type of PopupBox.OpenedEvent (as well as PopupBox.ClosedEvent) is EventHandler
it should be RoutedEventHandler

Version

4.7.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