Titanium Extended (2 Viewers)

Brownard

Development Group
  • Team MediaPortal
  • March 21, 2007
    2,002
    1,350
    Home Country
    United Kingdom United Kingdom
    Country flag
    Power is back :)
    @ge2301 To get transitions for the home menu you need to edit the 'BackgroundBrush' resource in styles\OtherControls.xaml (very near the top), this defines the image control to use for the background. You just use the ImageSourceWrapper as usual on the image control, i.e.
    XML:
      <ResourceWrapper x:Key="BackgroundBrush">
        <VisualBrush x:Name="BackdropImageBackgroundBrush">
          <VisualBrush.Visual>
            <Image x:Name="BackdropImageBackground" Stretch="Fill">
                <Image.Source>
                    <ImageSourceWrapper Delay="0.5" DelayInOut="true" Transition="transitions\dissolve" TransitionDuration="0.5"
                        Source="{Binding Source={StaticResource BackgroundManagerModel}, Path=BackgroundImage}"
                        FallbackSource="background.png" />
                </Image.Source>
            </Image>
          </VisualBrush.Visual>
        </VisualBrush>
      </ResourceWrapper>

    I still need to look at how latest media is handled and whether it is extensible enough to handle games...
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    7,383
    2,639
    Stuttgart
    Home Country
    Germany Germany
    Country flag
    Power is back :)
    @ge2301 To get transitions for the home menu you need to edit the 'BackgroundBrush' resource in styles\OtherControls.xaml (very near the top), this defines the image control to use for the background. You just use the ImageSourceWrapper as usual on the image control, i.e.
    Welcome back! :D Works like a charme. Thanks!
     

    Brownard

    Development Group
  • Team MediaPortal
  • March 21, 2007
    2,002
    1,350
    Home Country
    United Kingdom United Kingdom
    Country flag
    @ge2301 I've managed to fix the problems you were having with closing the hidden side menu. You need to adjust the HiddenMenuItemContainerStyle in styles\OtherControls.xaml so that Button.IsEnabled is bound to ListView.IsEnabled like so:
    XML:
    <Style x:Key="HiddenMenuItemContainerStyle" BasedOn="{ThemeResource DefaultItemContainerStyle}">
        <Setter Property="Template">
          <Setter.Value>
            <ControlTemplate TargetType="{x:Type ListViewItem}">
              <Button Style="{ThemeResource ButtonHiddenMenuStyle}"
                      Command="{DynamicResource ResourceKey=Menu_Command}"
                      IsEnabled="{Binding Enabled}" SetFocus="{Binding Path=Selected,Mode=OneTime}">
                <Button.IsEnabled>
                  <MultiBinding Converter="{StaticResource ExpressionMultiValueConverter}" ConverterParameter="{}{0} &amp;&amp; {1}">
                    <!-- Consider the item's enabled state -->
                    <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="IsEnabled"/>
                    <!-- In combination with the parent ListView's enabled state -->
                    <Binding RelativeSource="{RelativeSource Mode=FindAncestor,AncestorType={x:Type ListView}}" Path="IsEnabled"/>
                  </MultiBinding>
                </Button.IsEnabled>
                <Button.Triggers>
                  <Trigger Property="HasFocus" Value="True">
                    <Setter TargetName="ButtonControlRectangle" Property="IsVisible" Value="True"/>
                    <Setter TargetName="ItemLabel" Property="Color" Value="{ThemeResource TextColor}"/>
                  </Trigger>
                </Button.Triggers>
              </Button>
            </ControlTemplate>
          </Setter.Value>
        </Setter>
    </Style>

    I feel like that ideally this shouldn't be necessary and that it just masks an underlying issue with the focus handling, probably something to do with conflicting SetFocusPrios, but it is how it is implemented in Titanium.

    I still need to have a go at implementing a MultiTrigger so mouse handling works properly...

    EDIT
    It works even better if you disable the menu button when the menu is open. That way focus always jumps straight back to the list when pressing right rather than to the menu button first:
    XML:
    <Button x:Name="MenuShowButton" Content="Menu" Style="{ThemeResource ButtonWideStyle_GrowOnly}"
             Grid.Row="0" Grid.Column="0" HorizontalAlignment="Right" Height="180" Margin="20,0,0,0"
             IsEnabled="{Binding Source={StaticResource MenuModel},Path=!IsMenuOpen}"
             Command="{Command Source={StaticResource MenuModel}, Path=ToggleMenu}">     
      <Image Source="hiddenmenu_tab.png" Stretch="Uniform" Margin="0,0,0,0"/>
    </Button>
     
    Last edited:

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    7,383
    2,639
    Stuttgart
    Home Country
    Germany Germany
    Country flag
    Again you are a genius (y)(y)(y) I wasted so much time in trying everything with the margins :whistle:
    Now it's working really well and it's far the best way accessing a hiddenmenu in MP2!
    Today I'll implement a "TopHiddenMenu" for the coverflow view, as you can not enter the current HiddenMenu due to the MI loop and autofocus function. But even without both functions it would be bad to scrol through 500 MI to the left, just to access a menu :D
    I hope thats working to have two hidden menus with same content in the background.
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    7,383
    2,639
    Stuttgart
    Home Country
    Germany Germany
    Country flag
    It worked :D According to the layout (cover or another) the HiddenMenu settings are different.
    XML:
            <Grid x:Name="TopPanel" Margin="0,-1100,10,5" VerticalAlignment="Top"
                  Width="550" HorizontalAlignment="Center">
              <Grid.IsVisible>
                <Binding Source="{StaticResource ViewModeModel}" Path="LayoutType"
                         Converter="{StaticResource ExpressionValueConverter}" ConverterParameter="{}{0} == {LayoutType}.{CoverLayout}"/>
              </Grid.IsVisible>
    ...
    • In List- and GridView pressing "left" and the Menu slides out from the left. When pressing "right" it slides back and the MI is on focus.
    • in CoverView pressing "up" and the Menu slides out from the top . When pressing "down" it slides back and the MI is on focus.
    I'll implement the same for the power button now, so lot of button presses can be saved and we finally have a good navigation :)
    Unbenannt.jpg
     
    Last edited:

    Scheibes

    Portal Pro
    June 14, 2012
    817
    69
    36
    Home Country
    Germany Germany
    Country flag
    What does it mean, that Audio and Support Plugins in the first Post are red? Orange means inprogress i think. But red?
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,326
    3,790
    Lehmden
    Home Country
    Germany Germany
    Country flag
    Red = Not even started.
    But as always in MP2, this is not such a big issue. All plugins are always working with every skin. If no specific skin files are available the plugins are working with default skin files that are available for every plugin. Maybe they are not that good looking, but they are definitely working...
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    7,383
    2,639
    Stuttgart
    Home Country
    Germany Germany
    Country flag
    What does it mean, that Audio and Support Plugins in the first Post are red? Orange means inprogress i think. But red?
    • Audio is working 100% (green)
    • Image I will also complete within today, but not finished (orange)
    • The home screen is working well, but some features I planned are not yet implemented. I want at least to show an EPG summary (but the EPG part is broken at the moment with this skin. morpheus_xx is checking this) (orange)
    • Plugins skins are not started as Lehmden said. This is last priority and as I'm not owner of the plugins I want to implement all styles at once as all download packages need to be updated and the owener needs to be at least informed (red) :)
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    7,383
    2,639
    Stuttgart
    Home Country
    Germany Germany
    Country flag
    I fear the power menu can not be implemented with the new style easily as it uses the SystemStateModel and all slide animations are referring to the MenuModel.
    The SystemStateModel does not offer pathes as "IsMenuOpen, OpenMenu, CloseMenu, ToggleMenu" etc.

    @Brownard, perhaps you have an idea, but this one will be really tricky.

    My temporal modifications to masterhomemenu.xaml:
    XML:
     <Grid x:Name="ContentPanel" Margin="0,0,10,-650" VerticalAlignment="Bottom" Grid.Row="2" Grid.Column="0"
                  Width="550" HorizontalAlignment="Center" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">>
                <Grid.Resources>
                  <Storyboard x:Key="SlideDownStoryboard" FillBehavior="HoldEnd">
                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" FillBehavior="HoldEnd" Storyboard.TargetName="TopPanel" Storyboard.TargetProperty="RenderTransform.Y">
                      <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                      <SplineDoubleKeyFrame KeyTime="00:00:00.20" Value="850"/>
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </Grid.Resources>
                <Grid.Triggers>
                  <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>
                  <!-- Setting default state of menu to hidden -->
                  <EventTrigger RoutedEvent="Screen.Show">
                    <TriggerCommand Command="{Command Source={StaticResource MenuModel}, Path=CloseMenu}"/>
                  </EventTrigger>
                  <!-- Slide-In animation when the MenuModel.ShowMenu gets true -->
                  <DataTrigger Binding="{Binding Source={StaticResource MenuModel},Path=IsMenuOpen}" Value="True">
                    <DataTrigger.EnterActions>
                      <BeginStoryboard x:Name="SlideDown_BeginStoryboard" Storyboard="{ThemeResource SlideDownStoryboard}"/>
                    </DataTrigger.EnterActions>
                    <DataTrigger.ExitActions>
                      <StopStoryboard BeginStoryboardName="SlideDown_BeginStoryboard"/>
                    </DataTrigger.ExitActions>
                    <Setter TargetName="PowerMenu" Property="SetFocusPrio" Value="Highest" />
                    <Setter TargetName="PowerMenu" Property="SetFocus" Value="True" />
                  </DataTrigger>
                </Grid.Triggers>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="550"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                  <RowDefinition Height="800"/>
                </Grid.RowDefinitions>
                <Grid.RenderTransform>
                  <TranslateTransform Y="0"/>
                </Grid.RenderTransform>
                <!--Image Source="menu_fade.png" Stretch="Fill" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="-65,-168,-50,-50">
              </Image-->
                <Rectangle RadiusX="{ThemeResource DialogBorderCornerRadius}" RadiusY="{ThemeResource DialogBorderCornerRadius}"
                           HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,0,67,0">
                  <Rectangle.Fill>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                      <GradientStop Color="{ThemeResource DialogBackgroundGradient1Color}"/>
                      <GradientStop Color="{ThemeResource DialogBackgroundGradient2Color}" Offset="1"/>
                    </LinearGradientBrush>
                  </Rectangle.Fill>
                </Rectangle>
          
                <ListView x:Name="PowerMenu" Style="{ThemeResource HiddenMenuListViewStyle}" Margin="20,10,80,10"
                    HorizontalAlignment="Stretch" VerticalAlignment="Stretch" SetFocusPrio="Default"
                    ItemsSource="{Binding Source={StaticResource SystemStateModel},Path=ShutdownItems,Mode=OneTime}">
                  <ListView.Resources>
                    <CommandBridge x:Key="Menu_Command" Source="{StaticResource SystemStateModel}"
                                    Path="Select"
                                    Parameters="{LateBoundValue BindingValue={Binding}}"/>
                  </ListView.Resources>
                </ListView>
                <Button Grid.Row="0" Grid.Column="0" Style="{ThemeResource ButtonWideStyle_GrowOnly}" Opacity="1" VerticalAlignment="Top"
                        Command="{Command Source={Service WorkflowManager},Path=NavigatePush,Parameters=BBFA7DB7-5055-48D5-A904-0F0C79849369}"
                        IsVisible="{Binding Source={StaticResource MenuModel},Path=!IsHome}"
                        IsEnabled="{Binding Source={StaticResource MenuModel},Path=!IsMenuOpen}">
                  <Image Source="ShutdownIcon.png" />
                </Button>
              </Grid>
     

    Users who are viewing this thread

    Similar threads

    We are proud to present MediaPortal 2.3.1 MediaPortal 2.3.1 is a full-blown media center software that addresses the most common user requirements out of the box. Aside from its support for Live TV and Radio, it offers a complete media server for music, movies, and TV shows. Info is automatically downloaded from various sources to...
    We are proud to present MediaPortal 2.3.1 MediaPortal 2.3.1 is a full-blown media center software that addresses the most common...
    We are proud to present MediaPortal 2.3.1 MediaPortal 2.3.1 is a full-blown media center software that addresses the most common...
    Replies
    0
    Views
    768
    It is looking and working very well now and I am almost at the point of switching my HTPC to MP2, madvr would definitely push me over the edge for sure.;)
    It is looking and working very well now and I am almost at the point of switching my HTPC to MP2, madvr would definitely push me...
    We are proud to present MediaPortal 2.3 MediaPortal 2.3 is a full-blown media center software that addresses the most common user...
    Replies
    4
    Views
    2K
    • Sticky
    Just for your information: couldn't find the ns*.tmp file...
    Just for your information: couldn't find the ns*.tmp file...
    Pre Releases are provided as a way for the community to test and give feedback on all the exciting things we have lined up for the...
    Replies
    39
    Views
    1K
    • Sticky
    We are proud to present MediaPortal 2.3.2 MediaPortal 2.3.2 is a full-blown media center software that addresses the most common user requirements out of the box. Aside from its support for Live TV and Radio, it offers a complete media server for music, movies, and TV shows. Info is automatically downloaded from various sources to...
    We are proud to present MediaPortal 2.3.2 MediaPortal 2.3.2 is a full-blown media center software that addresses the most common...
    We are proud to present MediaPortal 2.3.2 MediaPortal 2.3.2 is a full-blown media center software that addresses the most common...
    Replies
    0
    Views
    799
    • Sticky
    We have just released MediaPortal 1.27 Highlights of this release Bugfixes: [MP1-5050] - GUIHome should not be copied next to the mediaportal executable [MP1-5051] - Music Playback fails with ReplayGain enabled and no ReplayGain Information in song [MP1-5053] - TV framerate is not parsed from tsbuffer Since Pre-Release ...
    We have just released MediaPortal 1.27 Highlights of this release Bugfixes: [MP1-5050] - GUIHome should not be copied next to...
    We have just released MediaPortal 1.27 Highlights of this release Bugfixes: [MP1-5050] - GUIHome should not be copied next to...
    Replies
    0
    Views
    2K
    Top Bottom