Skip to content

PlayState extension Controls

Brandon edited this page Aug 2, 2022 · 1 revision

Visibility of elements according to extension installation status

Example:

[...]
<Grid Visibility="{PluginStatus Plugin=PlayState, Status=Installed}">
[...]

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

Game Status Switcher control

Allows to pause and resume the game in view

<ContentControl x:Name="PlayState_GameStateSwitchControl" />

Extension data specific of the selected game

The source name of the plugin is PlayState

Setting Type Default Description
IsControlVisible bool false Indicates if the game in view can be paused or resumed by the extension and the control is visible

Binding example:

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