MouseDoubleClick is not working in Noesis
Posted: 16 Jun 2025, 20:09
Hello there, could I get some help on troubleshooting why MouseDoubleClick is not working, here are some context:
I created an inventory grid with slots in it, the slot (item) has a few interactions:
Hover, Click - Different visual states, and they are handled via Visual State Manger
Drag to move the item - it's a custom function we created to allow players to drag item to a different spot in the inventory. But this function listens to MouseLeftButtonDown / MouseLeftButtonUp
We need to create a different way to equip an item from the inventory grid, we thought double clicking is the most natural way to do that.
This is where it stops working, If the event is MouseDoubleClick, it wont do anything, but if I do MouseEnter, the command will work, so I know the command and the binding are correct, it's just the double click is not being listened.
I created an inventory grid with slots in it, the slot (item) has a few interactions:
Hover, Click - Different visual states, and they are handled via Visual State Manger
Drag to move the item - it's a custom function we created to allow players to drag item to a different spot in the inventory. But this function listens to MouseLeftButtonDown / MouseLeftButtonUp
We need to create a different way to equip an item from the inventory grid, we thought double clicking is the most natural way to do that.
Code: Select all
<b:EventTrigger EventName="MouseDoubleClick">
<b:InvokeCommandAction
Command="{Binding DataContext.EquipItem, ElementName=InventoryRoot}"
CommandParameter="{Binding}">
</b:InvokeCommandAction>
</b:EventTrigger>