WMC design for MP2 skin (1 Viewer)

Status
Not open for further replies.

henso

Development Group
  • Team MediaPortal
  • February 16, 2012
    2,341
    829
    Home Country
    Denmark Denmark
    @ge2301
    The ARTIST label seems to be taken from the occupation type of the ParsonAspect. Is taht correct? If yes, shouldn't it be localized?
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,705
    3,491
    Stuttgart
    Home Country
    Germany Germany

    henso

    Development Group
  • Team MediaPortal
  • February 16, 2012
    2,341
    829
    Home Country
    Denmark Denmark
    Is it not because their occupation is artist?
    Yes, it is but it is more of an type ID than it is a label. It's to identify what type of person the data is for. You can see the different types of persons here.
    You could use those "ID"'s for writing the localized text in the label.
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,705
    3,491
    Stuttgart
    Home Country
    Germany Germany
    Ok, that explains the capital letters ;). I'll add a localized label based on the property of occupation.
     

    ge2301

    Lead Design MP2
  • Team MediaPortal
  • January 11, 2014
    8,705
    3,491
    Stuttgart
    Home Country
    Germany Germany
    Ok, that explains the capital letters ;). I'll add a localized label based on the property of occupation.
    I localized, but there are 2 small issues for which I need a dev hint:
    • It seems I can not place strings (ACTOR, ...) directly into the ExpressionMultiValueConverter. Shall I add further bindings for each one with "Binding Souce=..."?
    • And I have problems to bind localization content [Media.xxx]. Instead of the localized text the LabelName with brackets is shown.
    XML:
                <Label FontSize="{ThemeResource SmallFontSize}" Color="{ThemeResource MenuTextBackground}" Opacity="1.3">
                  <Label.Content>
                    <MultiBinding Converter="{StaticResource ExpressionMultiValueConverter}"
                                  ConverterParameter="{}{0} == ARTIST ? {1} : ({0} == ACTOR ? {2} : ({0} == WRITER ? {3} : ({0} == DIRECTOR ? {4} : ({0} == COMPOSER ? {5}))))">
                      <Binding Path="Occupation"/>
                      <Binding Source="[Media.ArtistOccupationName]"/>
                      <Binding Source="[Media.ActorOccupationName]"/>
                      <Binding Source="[Media.WriterOccupationName]"/>
                      <Binding Source="[Media.DirectorOccupationName]"/>
                      <Binding Source="[Media.ComposerOccupationName]"/>
                    </MultiBinding>
                  </Label.Content>
                </Label>

    Edit: Following does also not bring any result
    XML:
                <Label FontSize="{ThemeResource SmallFontSize}" Color="{ThemeResource MenuTextBackground}" Opacity="1.3">
                  <Label.Content>
                    <MultiBinding Converter="{StaticResource ExpressionMultiValueConverter}"
                                  ConverterParameter="{}{0} == {1} ? {6} : ({0} == {2} ? {7} : ({0} == {3} ? {8} : ({0} == {4} ? {9} : ({0} == {5} ? {10}))))">
                      <Binding Path="Occupation"/>
                      <Binding Source="ARTIST"/>
                      <Binding Source="ACTOR"/>
                      <Binding Source="WRITER"/>
                      <Binding Source="DIRECTOR"/>
                      <Binding Source="COMPOSER"/>
                      <Binding Source="[Media.ArtistOccupationName]"/>
                      <Binding Source="[Media.ActorOccupationName]"/>
                      <Binding Source="[Media.WriterOccupationName]"/>
                      <Binding Source="[Media.DirectorOccupationName]"/>
                      <Binding Source="[Media.ComposerOccupationName]"/>
                    </MultiBinding>
                  </Label.Content>
                </Label>
     
    Last edited:
    Status
    Not open for further replies.

    Users who are viewing this thread

    Top Bottom