Jump to content
LaunchBox Community Forums
Jason Carr

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.

Share this post


Link to post
Share on other sites

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

Edited by Krakerman

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Damn! You da man 👍😁 Works perfectly!!

Thank you for all the help..

Edited by Krakerman
  • Like 1

Share this post


Link to post
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

Share this post


Link to post
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}"  />	 

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Did fix a minor issue with the gif code that I was using that corrected a small issue and now is working perfectly in my startup/shutdown themes

Update: Now have Gif support added to my pause themes 👍

Edited by Krakerman

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Well ..... Looks like using Gifs work however when using them in my startup theme there is a slight delay 4-5 secs before the startup screen shows with the gif. If I use a gif without any animation the startup screen shows right away.

Edited by Krakerman

Share this post


Link to post
Share on other sites

@y2guru Thx ! Drop shadow was a good idea. No, I don't need a exemple. I had hoped to have a direct control, but I will do some tests with drop shadows. Excellent idea ! 😃

Share this post


Link to post
Share on other sites

@viking no problem at all, I have noted what you ideally want and I’ll bring it up with Jason as there are a few wheel changes I would like to see

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
On 12/10/2019 at 8:55 AM, y2guru said:

Want the code snippet so you can mess with the settings?

got any tricks to show text like that but while using the steam banners for games? currently, theres a huge gray boy with the launchbox logo in the middle if you dont have a banner for that game.

Share this post


Link to post
Share on other sites

I wondering if I can get some guidance on resizing the grid with the thumbnails. I'm trying to make room for the navigation info on the bottom, but when I do the thumbnails get cropped. Is there a minimum size somewhere that I need to adjust?

Thanks!

Crop_LI.jpg

Share this post


Link to post
Share on other sites
On 4/3/2019 at 12:48 PM, garbanzo said:

Can anyone tell me if it's possible to add the front cover of the currently selected game to the details pane, centered within the red box in this mockup?

Details.png

Still hoping someone can offer some tips on how to get this to work. Thanks.

Share this post


Link to post
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
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...