Jump to content
LaunchBox Community Forums

Recommended Posts

Posted (edited)

Hello, I'm trying to get the marquee to only be a single static png (marquee.png) except when a game is running.

I'm modifying CriticalZoneV2 - Default to understand how it works since I'm very new to BigBox/Themes.


Is there some type of binding to tell when a game is running? I just put in IsGameRunning as a placeholder binding.  My thought was to use a DataTrigger to chose the scenario (playing a game vs not playing a game..)
Any ideas of how to achieve this? 
Thank you!

<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             mc:Ignorable="d"
             d:DesignHeight="562" d:DesignWidth="1000" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Style="{DynamicResource UserControlStyle}"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://siteoforigin:,,,/Themes/CriticalZoneV2 - Default/Styles/UserControlStyle.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>

    <Grid VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
        <Image Name="MarqueeImage"
               Stretch="Uniform"
               HorizontalAlignment="Center"
               VerticalAlignment="Center"
               RenderOptions.BitmapScalingMode="HighQuality">
            <Image.Style>
                <Style TargetType="Image">
                    <Setter Property="Source" Value="pack://siteoforigin:,,,/Themes/CriticalZoneV2 - Default/Images/marquee.png" />
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding Path=IsGameRunning}" Value="True">
                            <Setter Property="Source" Value="{Binding Path=SelectedGame.MarqueeImagePath}" />
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
            </Image.Style>
        </Image>
    </Grid>
</UserControl>
Edited by tikiTofu
Posted

Inside the marquee views is an "IsActive" binding you can use for this purpose. When true Big Box has focus, when false it doesn't (typically because you're playing a game)

  • Thanks 1

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...