Jump to content
LaunchBox Community Forums

XAML Tips and Tricks


Recommended Posts

2 hours ago, Krakerman said:

@faeran is there a way to use a say _Default background if the game background not found? So I would not have to create 600+ backgrounds per say for each game I could use a different default one for each platform and then that way I can create a background for certain ones within that coverflow view using your xml code you gave me.

With your added xml it is always looking for each games background image if one not there this it diplays a black background which I want to use a custom _default image.

There's a few different ways you can do this. The simplest solution would be to just place a second "default" image behind your game background image.

Link to comment
Share on other sites

16 minutes ago, Krakerman said:

How would I do that? and would it work as a per platform basis? So each platform could have a different image

Something like this.

Spoiler

<TextBlock x:Name="PlatformBackgrounds" Visibility="Collapsed">
            <TextBlock.Text>
                <MultiBinding StringFormat="{}pack://siteoforigin:,,,/Themes/Unified Redux/Images/PlatformBackgrounds/{0}.png">
                    <Binding Path="ActiveGame.Platform" />
                </MultiBinding>
            </TextBlock.Text>
        </TextBlock>
        <Image Source="{Binding Text, ElementName=PlatformBackgrounds}" RenderOptions.BitmapScalingMode="HighQuality" Height="{Binding ElementName=Canvas, Path=ActualHeight}" Width="{Binding ElementName=Canvas, Path=ActualWidth}" />

<TextBlock x:Name="GameBackgrounds" Visibility="Collapsed">
            <TextBlock.Text>
                <MultiBinding StringFormat="{}pack://siteoforigin:,,,/Themes/Unified Redux/Images/GameBackgrounds/{0}/{1}.png">
                    <Binding Path="ActiveGame.Platform" />
                    <Binding Path="ActiveGame.Title" />
                </MultiBinding>
            </TextBlock.Text>
        </TextBlock>
        <Image Source="{Binding Text, ElementName=GameBackgrounds}" RenderOptions.BitmapScalingMode="HighQuality" Height="{Binding ElementName=Canvas, Path=ActualHeight}" Width="{Binding ElementName=Canvas, Path=ActualWidth}" />

 

 

  • Like 2
Link to comment
Share on other sites

I am trying to get gifs to load from a platform folder and using the game name but doesn't work. Example:

<Image gif:ImageBehavior.AnimatedSource="{}pack://siteoforigin:,,,/StartupThemes/LBFade/Images/Gifs/{0}/{1}.gif" RenderOptions.BitmapScalingMode="HighQuality" Height="{Binding ElementName=Canvas, Path=ActualHeight}" Width="{Binding ElementName=Canvas, Path=ActualWidth}">
</Image>

I do have GIFs working just want to keep them organized within a platform folder and each game could have it's own gifs when launching the game. This code above does not work. This is for the startup theme.

Here is what I do have that works:

<Image gif:ImageBehavior.AnimatedSource="{}pack://siteoforigin:,,,/StartupThemes/LBFade/Images/Gifs/Atari 2600.gif" RenderOptions.BitmapScalingMode="HighQuality" Height="{Binding ElementName=Canvas, Path=ActualHeight}" Width="{Binding ElementName=Canvas, Path=ActualWidth}">
</Image>

This works for fullscreen 3840x2160 gifs with transparent backgrounds ?

Edited by Krakerman
Link to comment
Share on other sites

@Krakerman The prior code @faeran gave you for you game specific backgrounds will work as well. Just make a little edit to the source and change the path to the correct folder structure and change the file type to .gif. Something like below. The x:Name can be anything you want to call it. Just make sure in the "ElementName" you reference the same name there. I use something similar to this for gifs.

			<TextBlock x:Name="GameGifs" >
				<TextBlock.Text>
					<MultiBinding StringFormat="{}pack://siteoforigin:,,,/StartupThemes/LBFade/Images/Gifs/{0}/{1}.gif">
						<Binding Path="SelectedGame.Platform" />
						<Binding Path="SelectedGame.Title" />
					</MultiBinding>
				</TextBlock.Text>
			</TextBlock>
			<Image gif:ImageBehavior.AnimatedSource="{Binding Text, ElementName=GameGifs}" Stretch="UniformToFill" RenderOptions.BitmapScalingMode="HighQuality"
            Height="{Binding ElementName=Canvas, Path=ActualHeight}" Width="{Binding ElementName=Canvas, Path=ActualWidth}"  />	 

 

Link to comment
Share on other sites

  • 2 weeks later...

I want to be able to launch this within xaml if possible:

C:\Program Files (x86)\DisplayFusion\DisplayFusionCommand.exe -wallpaperloadprofile "Default"

Is this possible to add within xaml in LB/BB? Also within that command line the quotes need to be included.

I know already how to add it within LB/BB as Additional Apps but I want to embed this in my themes code if possible.

 

Edited by Krakerman
Link to comment
Share on other sites

3 hours ago, viking said:

Hi guys !
Quick question: Is it possible to work on fonts for ClearLogoWheels? Where?

When there is no ClearLogo, the platform/game name is displayed as text. I would like to add a black outline to this white font.
Possible ?

Thx !!!

its possible but the solution affects the clear logo, ill let you judge

cap1-with.png

cap2-without.png

cap3-with more.png

Link to comment
Share on other sites

  • 5 weeks later...

Hi everyone, new little question:

The Colorful theme doesnt work well with "theme" games video. (Hyperspin style)
Is there a way in the video calling code to force it on a type of video? Like "no theme video".
To view videos of simple gameplay only. (if available)

In LaunchBox, you can filter media type. "Theme Video" being categorized apart. So there may be a way????

@Jason Carr @Grila @eatkinola ?? ?

Edited by viking
Link to comment
Share on other sites

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