Skip to content

Addition in a custom theme

Lacro59 edited this page Jan 29, 2021 · 8 revisions

In full screen application only the differents resources are available.

Differents resources disponible with DynamicResource

Name Type Default Description
Ssv_HasData bool false if have data
Ssv_Count double 0
Ssv_ListScreenshots List Screenshots List.Empty details

Code integration example with options "Custom theme integration"

Show a element if there is data

<StackPanel Tag="{DynamicResource Ssv_HasData}">
    <StackPanel.Style>
        <Style>
            <Setter Property="Control.Visibility" Value="Visible" />
            <Style.Triggers>
                <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" Value="False">
                    <Setter Property="Control.Visibility" Value="Collapsed" />
                </DataTrigger>
            </Style.Triggers>
        </Style>
    </StackPanel.Style>

    <here your custom code or a element predefined with extension>
</StackPanel>

Show a element if the plugin is actived

<StackPanel Tag="{DynamicResource Ssv_HasData}">
    <StackPanel.Style>
        <Style>
            <Setter Property="Control.Visibility" Value="Visible" />
            <Style.Triggers>
                <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" Value="{x:Null}">
                    <Setter Property="Control.Visibility" Value="Collapsed" />
                </DataTrigger>
            </Style.Triggers>
        </Style>
    </StackPanel.Style>

    <here your custom code or a element predefined with extension>
</StackPanel>

Show a element if there is data and the plugin is actived

<StackPanel Tag="{DynamicResource Ssv_HasData}">
    <StackPanel.Style>
        <Style>
            <Setter Property="Control.Visibility" Value="Visible" />
            <Style.Triggers>
                <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" Value="{x:Null}">
                    <Setter Property="Control.Visibility" Value="Collapsed" />
                </DataTrigger>
                <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" Value="False">
                    <Setter Property="Control.Visibility" Value="Collapsed" />
                </DataTrigger>
            </Style.Triggers>
        </Style>
    </StackPanel.Style>

    <here your custom code or a element predefined with extension>
</StackPanel>

Show a button that open plugin view

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

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

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

Create a custom button what open plugin view

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

Show single screenshot

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

Show list screenshots

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

Clone this wiki locally