Playnite Forums
  • Playnite Web
  • Rules
  • Members
  • Team
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Playnite Forums Development Themes (Help) Game info feilds

(Help) Game info feilds
tillaz87
Offline

#1
11-09-2021, 04:42 PM
So one thing is stopping me releasing my theme 

When displaying game info im getting a whole list for AgeRating and features rather than one item.

I just want to disply PEGI for AgeRating no others and for festures Multiplayer or Single player 

I am currently using this code 

                                    <TextBlock Style="{DynamicResource TextBlockBaseStyle}" VerticalAlignment="center" HorizontalAlignment="center"
                                               Text="{Binding SelectedGame.AgeRatings, Converter={StaticResource ListToStringConverter}}" />

                                <StackPanel Margin="10,0,0,0">
                                    <TextBlock Style="{DynamicResource TextBlockBaseStyle}" VerticalAlignment="center" HorizontalAlignment="center"
                                               Text="{Binding SelectedGame.Features, Converter={StaticResource ListToStringConverter}}" />



[Image: Playnite-09-11-2021-16-16-58.png]

[Image: Playnite-09-11-2021-16-16-07.png]





Now ive noticed there are bindings for "feature" and "AgeRating" So I assumed these without the "S" on end would give a single result but when using this code below nothing is displayed at all?

                                    <TextBlock Style="{DynamicResource TextBlockBaseStyle}" VerticalAlignment="center" HorizontalAlignment="center"
                                               Text="{Binding SelectedGame.Feature}" />


                                    <TextBlock Style="{DynamicResource TextBlockBaseStyle}" VerticalAlignment="center" HorizontalAlignment="center"
                                               Text="{Binding SelectedGame.AgeRating}" />

[Image: last.png]


Can someone please help me out.
Crow
Offline

Administrator
#2
11-09-2021, 05:16 PM
Fields like AgeRatings are lists, so you need to index them: Text="{Binding SelectedGame.AgeRatings[0].Name}"

Any bindings to singular forms are not valid because those don't exist on game object. They are only internally used for grouping purposes.
tillaz87
Offline

#3
11-09-2021, 06:46 PM
(11-09-2021, 05:16 PM)Crow Wrote: Fields like AgeRatings are lists, so you need to index them: Text="{Binding SelectedGame.AgeRatings[0].Name}"

Any bindings to singular forms are not valid because those don't exist on game object. They are only internally used for grouping purposes.

Thanks what about features? is there a way to show multiplayer only and if that is not there show single player only?
Crow
Offline

Administrator
#4
11-09-2021, 08:18 PM
You might be able to put it somehow together using triggers based on "Count" property that those list fields have.
« Next Oldest | Next Newest »



  • View a Printable Version
  • Subscribe to this thread

© Designed by D&D - Powered by MyBB

Linear Mode
Threaded Mode