Jump to content
LaunchBox Community Forums

Recommended Posts

Posted

Hi.

How can I make additional applications appear in a window with information about the game?

At the moment, additional applications are displayed as a drop-down list. (code from Default LBTheme):

<Button Margin="6,0,0,0">
    <i:Interaction.Triggers>
        <i:EventTrigger EventName="Click">
            <cal:ActionMessage MethodName="PlayableVersionDropDown">
            <cal:Parameter Value="$source" />
            </cal:ActionMessage>
        </i:EventTrigger>
    </i:Interaction.Triggers>
    <Button.Style>
        <Style TargetType="Button">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <Border BorderThickness="1" Background="{TemplateBinding Background}" BorderBrush="{StaticResource SolidBorderColor}" CornerRadius="3">
                            <Grid Name="Grid">
                                <ContentPresenter x:Name="Presenter" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
                            </Grid>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger SourceName="Grid" Property="IsMouseOver" Value="True">
                                <Setter TargetName="Grid" Property="Background" Value="{StaticResource MouseOverColor}" />
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="Background" Value="{StaticResource PrimaryColorSolid}"/>                
            <Style.Triggers>
                <DataTrigger Binding="{Binding HasPlayableVersions}" Value="False">
                    <Setter Property="Visibility" Value="Collapsed"/>
                    <Setter Property="IsTabStop" Value="True"/>
                </DataTrigger>
            </Style.Triggers>
        </Style>
    </Button.Style>
    <TextBlock FontSize="18" Foreground="White" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center" TextAlignment="Center">
        <TextBlock.Style>
            <Style TargetType="{x:Type TextBlock}">
                <Setter Property="Text" Value="Additional"/>
                <Setter Property="Padding" Value="24,0"/>
            </Style>
        </TextBlock.Style>
    </TextBlock>                            
</Button>


I tried to do the same as the code from the Omni theme for displaying documents (pdf, jpg, cbr: manuals, etc.)

<ItemsControl Margin="3,3,3,0" ItemsSource="{Binding Documents}">
    <ItemsControl.ItemTemplate>
        <DataTemplate>
            <StackPanel Orientation="Horizontal">
                <Image VerticalAlignment="Center" HorizontalAlignment="Left" Stretch="Uniform" StretchDirection="Both" Source="{Binding Icon}"/>
                <TextBlock Margin="9,0,0,3">
                    <Hyperlink Command="{Binding ClickCommand}">
                        <Hyperlink.Style>
                            <Style TargetType="{x:Type Hyperlink}">
                                <Setter Property="TextBlock.TextDecorations" Value="{x:Null}" />
                                <Setter Property="TextBlock.Foreground" Value="#A6FFFFFF"/>
                                <Style.Triggers>
                                    <Trigger Property="IsMouseOver" Value="True">
                                        <Setter Property="TextBlock.TextDecorations" Value="Underline" />
                                        <Setter Property="TextBlock.Foreground" Value="White"/>
                                    </Trigger>
                                </Style.Triggers>
                            </Style>
                        </Hyperlink.Style>
                        <TextBlock Text="{Binding Title}" FontSize="13" TextTrimming="CharacterEllipsis" />
                    </Hyperlink>
                </TextBlock>
            </StackPanel>
        </DataTemplate>
    </ItemsControl.ItemTemplate>
    <ItemsControl.ItemContainerStyle>
        <Style>
            <Setter Property="Control.Margin" Value="0,0,0,6"/>
        </Style>
    </ItemsControl.ItemContainerStyle>
</ItemsControl>

 

Changing 

ItemsSource="{Binding Documents}"

to

ItemsSource="{Binding PlayableVersions}"
ItemsSource="{Binding PlayableVersion}"


It didn't work. Can you help with the code?

55.jpg

Untitled-1.jpg

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...