Can't bind default action when using Mahapps Metro window RightWindowsCommands

14 Views Asked by At

I'm using this code with Caliburn Micro:

<mah:MetroWindow.RightWindowCommands>
    <mah:WindowCommands>
        <Button  Name="ClearAll" ToolTip="Clear all">
            <iconPacks:PackIconMaterialDesign Kind="ClearAll" />
        </Button>
    </mah:WindowCommands>
</mah:MetroWindow.RightWindowCommands>

but the funcion ClearAll in the ViewModel is not called. If I move the button on the body of the window it works instead. I checked the datacontext and it is properly set on the button wherever is placed.

0

There are 0 best solutions below