Skip to content

Addition in a custom theme

Lacro59 edited this page Sep 1, 2020 · 18 revisions

Differents resources disponible with DynamicResource

Name Type Default Description
Ga_HasData bool false if have session data
Ga_HasDataLog bool false if have log session data
Ga_LastDateSession string string.Empty date last game session
Ga_LastDateTimeSession string string.Empty datetime last game session
Ga_LastPlaytimeSession string string.Empty playtime last game session

Code integration example with options "Custom theme integration"

Show a element if there is data

<Label Content="visible when has data" Tag="{DynamicResource Ga_HasData}" 
       Visibility="{Binding RelativeSource={RelativeSource Self}, Path=Tag, Converter={StaticResource BooleanToVisibilityConverter}}" />

Show graphic with time session

<StackPanel Name="PART_GameActivity_Graphic" With="optional" Height="optional" />

Show graphic with last log session

<StackPanel Name="PART_GameActivity_GraphicLog" With="optional" Height="optional" />

Create a custom button what open plugin view

<Button Name="PART_GaCustomButton">your custom template here</Button>