Playnite Forums
  • Playnite Web
  • Rules
  • Members
  • Team
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Playnite Forums Development Themes data triggers

data triggers
tillaz87
Offline

#1
01-10-2022, 12:04 PM (This post was last modified: 01-10-2022, 12:05 PM by tillaz87.)
How can i use a data trigger to change matadata values to my own text string or image? 

for example if PEGI 18 exists show 18? or even an image?

tried this as a guess but just crashes. 

<ControlTemplate.Triggers>
    <DataTrigger Binding="{Binding SelectedGame.AgeRatings[0].Name}" Value="PEGI 18">
       <Setter Property="Text" Value="18" TargetName="AgeRatings" />
    </DataTrigger>
</ControlTemplate.Triggers>
Crow
Offline

Administrator
#2
01-10-2022, 07:44 PM (This post was last modified: 01-10-2022, 07:45 PM by Crow.)
This is all context sensitive, "SelectedGame" doesn't always exists, depending on a view or control. I currently do not officially support direct binding to game data like this since it can lead to several issues (or be broken by changes I make in an update), like crashes.

The only direct binding scenario I support is if it's provided by Blend editor context on some views, you can see if that's the case for a specific view here:
https://playnite.link/docs/master/tutori...n-to-views

As far as general translation of fields, that's planned in future: https://github.com/JosefNemec/Playnite/issues/1902
tillaz87
Offline

#3
01-11-2022, 08:12 PM (This post was last modified: 01-11-2022, 08:19 PM by tillaz87.)
(01-10-2022, 07:44 PM)Crow Wrote: This is all context sensitive, "SelectedGame" doesn't always exists, depending on a view or control. I currently do not officially support direct binding to game data like this since it can lead to several issues (or be broken by changes I make in an update), like crashes.

The only direct binding scenario I support is if it's provided by Blend editor context on some views, you can see if that's the case for a specific view here:
https://playnite.link/docs/master/tutori...n-to-views

As far as general translation of fields, that's planned in future: https://github.com/JosefNemec/Playnite/issues/1902

Thanks for reply is it possible to add the date in xaml for example "Tuesday, January 11, 2022"

I've tried I few things but had no look 
tillaz87
Offline

#4
01-12-2022, 01:34 PM
Never mind figured it out
« Next Oldest | Next Newest »



  • View a Printable Version
  • Subscribe to this thread

© Designed by D&D - Powered by MyBB

Linear Mode
Threaded Mode