Blue Vision (1 Viewer)

ge2301

Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,705
    3,491
    Stuttgart
    Home Country
    Germany Germany
    Does anybody how I can combine below 3 values into a Label?
    The ExpressionMultiValueConverter does not work, because {0} and {2} are not strings. But because a SlimTvDateFormatConverter is used, I can not add a StringConverter additionally. MPF does not allow usages of multiple converter. Nested MultiBindings are also not possible.

    XML:
            <Label Color="{ThemeResource TextColor}" Scroll="Auto">
              <Label.Content>
                <MultiBinding Converter="{StaticResource ExpressionMultiValueConverter}" ConverterParameter="{}{0}+{1}+{2}">
                  <Binding Path="CurrentProgram.StartTime" Converter="{StaticResource SlimTvDateFormatConverter}"/>
                  <Binding Source=" — "/>
                  <Binding Path="CurrentProgram.EndTime" Converter="{StaticResource SlimTvDateFormatConverter}"/>
                </MultiBinding>
              </Label.Content>
            </Label>

    The current solution with a StackPanel including 3 labels is not feasible, because neither TextTrimming nor Scroll="Auto" are possible.
    In case {0} and {2} have not only a time, but also a date the total length is too much and overlapping other parts.
     

    Brownard

    Development Group
  • Team MediaPortal
  • March 21, 2007
    2,290
    1,872
    Home Country
    United Kingdom United Kingdom
    because {0} and {2} are not strings.
    SlimTvDateFormatConverter does return strings, does it work if you take the separator binding out?
    XML:
            <Label Color="{ThemeResource TextColor}" Scroll="Auto">
              <Label.Content>
                <MultiBinding Converter="{StaticResource ExpressionMultiValueConverter}" ConverterParameter="{}{0}+{1}">
                  <Binding Path="CurrentProgram.StartTime" Converter="{StaticResource SlimTvDateFormatConverter}"/>
                  <Binding Path="CurrentProgram.EndTime" Converter="{StaticResource SlimTvDateFormatConverter}"/>
                </MultiBinding>
              </Label.Content>
            </Label>
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,705
    3,491
    Stuttgart
    Home Country
    Germany Germany
    because {0} and {2} are not strings.
    SlimTvDateFormatConverter does return strings, does it work if you take the separator binding out?
    XML:
            <Label Color="{ThemeResource TextColor}" Scroll="Auto">
              <Label.Content>
                <MultiBinding Converter="{StaticResource ExpressionMultiValueConverter}" ConverterParameter="{}{0}+{1}">
                  <Binding Path="CurrentProgram.StartTime" Converter="{StaticResource SlimTvDateFormatConverter}"/>
                  <Binding Path="CurrentProgram.EndTime" Converter="{StaticResource SlimTvDateFormatConverter}"/>
                </MultiBinding>
              </Label.Content>
            </Label>
    Does not work, result is also an empty string. In other cases it works, but also only if I add a StringFormatConverter behind the path.
     

    Brownard

    Development Group
  • Team MediaPortal
  • March 21, 2007
    2,290
    1,872
    Home Country
    United Kingdom United Kingdom
    After a bit of testing the underlying issue is that the converter on a Binding inside a MultiBinding is not used, i.e. the SlimTvDateFormatConverter is not being used, internally the ExpressionMultiValueConverter just sees the original DateTime. I can't see an easy fix or workaround at the moment :(
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,705
    3,491
    Stuttgart
    Home Country
    Germany Germany
    After a bit of testing the underlying issue is that the converter on a Binding inside a MultiBinding is not used, i.e. the SlimTvDateFormatConverter is not being used, internally the ExpressionMultiValueConverter just sees the original DateTime. I can't see an easy fix or workaround at the moment :(
    Thanks anyway, at least I know the reason now. Too bad, that two converters at once can not be used.
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,705
    3,491
    Stuttgart
    Home Country
    Germany Germany
    @ge2301 I've fixed the side menu not being closable in BV, the content panel was set to be disabled when the menu was open so the media items list wasn't focusable so there was no where to navigate to. I'm not sure why you added that but I couldn;t see any ill effects with it removed, I haven't checked but I imagine its a similar issue in the other skins. Change is here.
    I'll look into why the menu randomly closes...
    Another problem now. I can not select menu entries of the slide menu by mouse, but only keyboard or remote.
    Didn't realize that before :whistle: Edit: Reported this in another thread, please ignore here and sorry for double post.
     

    Brownard

    Development Group
  • Team MediaPortal
  • March 21, 2007
    2,290
    1,872
    Home Country
    United Kingdom United Kingdom
    Another problems now. I can not select menu entries of the slide menu by mouse, but only keyboard or remote.
    I've pushed a fix, there were a couple of issues. There was a negative margin on the button image but not the button so the button was actually off screen and couldn't get mouse focus, the footer contents were above the bottom menu so it couldn't get focus and lastly the UserInputCapture control was interfering with the mouse clicks. I commented out the UserInputCapture as I don;t think its needed with the new menus, I also made some slight changes to the layout so the menus are easier to open with the mouse so you might want to check everything looks as it should :whistle:
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,705
    3,491
    Stuttgart
    Home Country
    Germany Germany
    I finally created a PersonStyle, that is used for Artists, Actors, Writers, Composers, AlbumArtists, ... with corresponding details footer.
    It will be available with the MP2.1 Final Release.

    Unbenannt.jpg

    Unbenannt2.jpg
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,705
    3,491
    Stuttgart
    Home Country
    Germany Germany
    Additionally to the recording indicator I added a Importing Indicator. The indicator is rotating smoothly. Thanks @henso
    I'm trying to show also the percentage value of the import progress next to the indicator. Currently there are problems with that.
    unbenannt3-jpg.187784.jpg
     

    Users who are viewing this thread

    Top Bottom