Skip to content

Splitbutton Click trigger when I click on a popup content element #3643

@JeanPhilippeLux

Description

@JeanPhilippeLux

Bug explanation

Hi,

I use the splitbutton. If I add a button in the popupcontent, when I click on it, the click event of the button of the popupcontent is fired, but also the Click event of the splitbutton.

here is my code :

                    <materialDesign:SplitButton  Style="{StaticResource MaterialDesignOutlinedSplitButton}" Height="32" materialDesign:ButtonAssist.CornerRadius="7" PopupPlacementMode="BottomAndAlignRightEdges" PopupUniformCornerRadius="7" Click="BtExportCard_Click" >

                        <materialDesign:SplitButton.Content>
                            <StackPanel Orientation="Horizontal">
                                <materialDesign:PackIcon Kind="FileExportOutline" Foreground="{DynamicResource MaterialDesign.Brush.Primary}"></materialDesign:PackIcon>
                                <TextBlock Text="Changement de carte" Foreground="{DynamicResource MaterialDesign.Brush.Primary}"></TextBlock>
                            </StackPanel>

                        </materialDesign:SplitButton.Content>

                        <materialDesign:SplitButton.PopupContent>
                            <Button Content="Export Excel" PackIconKing="{materialDesign:PackIcon Kind=FileExcelBoxOutline}" Click="ExportCardExcel"></Button>
                        </materialDesign:SplitButton.PopupContent>
                        
                    </materialDesign:SplitButton>

If I click on the button of the popupcontent, the "ExportCardExcel" will be fired and afhter the "BtExportCard_Click".

can someone help me?

thank you.
Jean-Philippe.

Version

5.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions