Titanium Extended (1 Viewer)

Brownard

Development Group
  • Team MediaPortal
  • March 21, 2007
    2,306
    1,884
    Home Country
    United Kingdom United Kingdom
    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
    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>
    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
     
    Last edited:

    Brownard

    Development Group
  • Team MediaPortal
  • March 21, 2007
    2,306
    1,884
    Home Country
    United Kingdom United Kingdom
    If we had a MultiTrigger element you could probably get this working with a mouse too as we could set the trigger on IsKeyboardFocusWithin OR IsMouseOver. I might have a go at implementing it if I find time.
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,741
    3,501
    Stuttgart
    Home Country
    Germany Germany
    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
    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>
    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
    Thanks a lot! I'll try that tonight. I have used TriggerCommand with the button and "togglemenu". perhaps this was the mistake and it should be "openmenu". I'll report later the outcome :)
     

    Brownard

    Development Group
  • Team MediaPortal
  • March 21, 2007
    2,306
    1,884
    Home Country
    United Kingdom United Kingdom
    It was probably the fact you were setting the trigger on the button, as soon as the menu is opened the focus is moved to the menu so the button no longer has focus and the menu will close again, make sure you set the trigger on the grid instead.
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,741
    3,501
    Stuttgart
    Home Country
    Germany Germany
    It is working to open the menu by keyboard and mouse only with "IsKeyboardFocusWithin" :)
    Also mouse focus is considered for some reason, just the menu is shortly flickering before opening. tHis is not a big deal at the moment.

    Closing the menu is theoretically working, so the idea is right. Practically, it works only, if the right menu item is selected or by a bypass route.
    Please the screenshot for more details.
    Unbenannt.jpg
     
    Last edited:

    Brownard

    Development Group
  • Team MediaPortal
  • March 21, 2007
    2,306
    1,884
    Home Country
    United Kingdom United Kingdom
    It does close from any menu item when applied in Titanium so it might be worth looking at any layout differences. The focus prediction doesn't take into account any RenderTransforms you have applied, for example in Storyboards, it's calculated from the 'initial' position of the control, so something else to bear in mind.
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,741
    3,501
    Stuttgart
    Home Country
    Germany Germany
    It does close from any menu item when applied in Titanium so it might be worth looking at any layout differences. The focus prediction doesn't take into account any RenderTransforms you have applied, for example in Storyboards, it's calculated from the 'initial' position of the control, so something else to bear in mind.
    Thanks for the hint. I have tried in Titanium skin and it really works:) For one hour I was playing with Margins and RenderTransformations etc in Titanium Reloaded.
    I tried to achieve same margins and heights between hiddenmenu (initial area w/o Storyboard) and the content area. It always ends in the same problem :(:giggle:

    I'll try to continue tomorrow. In worst case I build-up the master_menu.xaml from sketch.

    btw: Here is the branch of Titanium Reloaded: https://github.com/MediaPortal/MediaPortal-2/tree/FEAT_BV_Titanium_Reloaded_v1
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,741
    3,501
    Stuttgart
    Home Country
    Germany Germany
    Finally the GroupMenu looks like this:
    Unbenannt.jpg

    I also removed the colorful tile images from base skin, as I don't like them. I took over my new tile images from Win10 theme, that look more "adult" and "clear".
     
    Last edited:

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,741
    3,501
    Stuttgart
    Home Country
    Germany Germany
    One of the things, that is also still not working is implementation of Brownards great transitions to the backgrounds in the Main Menu screen.
    It seems that the sources are defined in the Background Handler and nowhere in xaml's. I also couldn't make the automatic opening of the hidden menu work yet. I made a test version eliminating all negative margins and RenderTransforms, previously mentioned problem remains. In next step I'll try to rebuild it from beginning using Titanius as base ... I hope, that I find the root cause by this.
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,741
    3,501
    Stuttgart
    Home Country
    Germany Germany
    Hi,
    I started to work on the TV screens to have something ready for Christmas or NewYear ;)
    However I face a problem, that is not understandable for me. When I copy any SlimTvStyles.xaml into "..\Themes\Titanium Reloaded\Styles\" MP2 is crashing and the error log shows a (for me) not understandable error. See attachement.
    I tried the SlimTvStyles.xaml from BlueVision Default Theme, Win10 Theme and only Default skin.

    [2015-12-19 11:58:33,991] [5182 ] [AMQ 'ScreenManager'] [ERROR] - Unhandled exception in message handler of async message queue 'ScreenManager' when handling a message of type 'ShowScreen'
    System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
    bei MediaPortal.UI.SkinEngine.Controls.Visuals.Templates.TemplateWithTriggers.LoadContent(UIElement triggerParent)
    bei MediaPortal.UI.SkinEngine.Controls.Visuals.Control.OnTemplateChanged(AbstractProperty property, Object oldValue)
    bei MediaPortal.Common.General.SProperty.Fire(Object oldValue)
     

    Users who are viewing this thread

    Top Bottom