Skip to content

News Viewer

Brandon edited this page Jun 10, 2022 · 7 revisions

Full integration tutorial for theme developers is available in the Playnite documentation: https://playnite.link/docs/devel/tutorials/themes/extensionIntegration.html

Integration of custom controls in custom themes

Visibility of elements according to extension installation status

Example:

[...]
<Grid Visibility="{PluginStatus Plugin=NewsViewer_15e03ffe-90f6-4e8e-bd4d-94514777481d, Status=Installed}">
[...]

It can also be used to return a bool value if used in another property.

News Viewer control

<ContentControl x:Name="NewsViewer_NewsViewerControl" />

Extension data specific of the selected game

The source name of the plugin is NewsViewer

Setting Type Default Description
IsControlVisible bool false Indicates if the News Viewer control is visible

Binding example:

[...]
<StackPanel>
    <StackPanel.Style>
        <Style TargetType="StackPanel">
            <Setter Property="Visibility" Value="Collapsed" />
            <Style.Triggers>
                <DataTrigger Binding="{PluginSettings Plugin=NewsViewer, Path=ReviewsAvailable, FallbackValue=False}" Value="True">
                    <Setter Property="Visibility" Value="Visible" />
                </DataTrigger>
            </Style.Triggers>
        </Style>
    </StackPanel.Style>
[...]