(Help) Game info feilds - Printable Version +- Playnite Forums (https://playnite.link/forum) +-- Forum: Development (https://playnite.link/forum/forum-10.html) +--- Forum: Themes (https://playnite.link/forum/forum-9.html) +--- Thread: (Help) Game info feilds (/thread-945.html) |
(Help) Game info feilds - tillaz87 - 11-09-2021 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" <StackPanel Margin="10,0,0,0"> 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" <TextBlock Style="{DynamicResource TextBlockBaseStyle}" VerticalAlignment="center" HorizontalAlignment="center" Can someone please help me out. RE: (Help) Game info feilds - Crow - 11-09-2021 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. RE: (Help) Game info feilds - tillaz87 - 11-09-2021 (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}" Thanks what about features? is there a way to show multiplayer only and if that is not there show single player only? RE: (Help) Game info feilds - Crow - 11-09-2021 You might be able to put it somehow together using triggers based on "Count" property that those list fields have. |