- March 21, 2007
- 2,306
- 1,884
- Home Country
- United Kingdom
- Moderator
- #41
I think I've figured this out, the missing pieces were CommandTrigger and the IsKeyboardFocusWithin property
If you add the following into Grid.Triggers for the 'LeftPanel' grid in master_menu (in regular titanium skin) it seems to work as you want
IsKeyboardFocusWithin is true if the focus is on any of the child controls and the TriggerCommand executes the command.
EDIT: This appears to make the menu unusable with a mouse, as soon as you move the mouse the focus is lost and the menu slides out,not sure if this is just due to the Titanium layout
If you add the following into Grid.Triggers for the 'LeftPanel' grid in master_menu (in regular titanium skin) it seems to work as you want
XML:
<Trigger Property="IsKeyboardFocusWithin" Value="True">
<Trigger.EnterActions>
<TriggerCommand Command="{Command Source={StaticResource MenuModel}, Path=OpenMenu}"/>
</Trigger.EnterActions>
<Trigger.ExitActions>
<TriggerCommand Command="{Command Source={StaticResource MenuModel}, Path=CloseMenu}"/>
</Trigger.ExitActions>
</Trigger>
EDIT: This appears to make the menu unusable with a mouse, as soon as you move the mouse the focus is lost and the menu slides out,
Last edited: