Jump to content
LaunchBox Community Forums

XAML Tips and Tricks


Recommended Posts

I essentially using a modified Unified Redux theme and enabled Coverflow and removed some code so background is brighter and not have a black gradient over it making it look dark and now I want to add custom background images per game and for my pause, startup/exit screens. As you can tell from my code what I removed from the original theme.

The startup/exit/pause are just modified the default themes removing everything except only wanting a background image to display. 

 

 

Edited by Krakerman
Link to comment
Share on other sites

Hopefully that all makes sense now. ? 

 

If this all works out what it does is combine the look of HyperSpin/CoverFlow/RocketLauncher Fades and LB pause all rolled into LB/BB! I want my Arcades to have the HyperSpin look and consoles with the CoverFlow while have startup/exit look like the RocketLauncher Fades and have custom LB pause screens for each game with artwork that I am working on. In the process of converting all my RL fades over to LB/BB and soon designing video themes for BB. 

In process of 100% migration over from HS & RL ? Just need to get this last part to work and will be set. It currently working but not the way it needs to be intended and work correctly. With you help think we'll be there.

Edited by Krakerman
Link to comment
Share on other sites

Oh, I see. Yes, things are a bit different with each view.

For startup themes, try this:

      <TextBlock x:Name="GameBackgrounds" Visibility="Collapsed">
        <TextBlock.Text>
          <MultiBinding StringFormat="{}pack://siteoforigin:,,,/Themes/Unified Redux/Images/GameBackgrounds/{0}/{1}.png">
            <Binding Path="SelectedGame.Platform" />
            <Binding Path="SelectedGame.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}" />

For game views, use this:

        <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}" />

 

Link to comment
Share on other sites

7 minutes ago, Krakerman said:

Confusing me here. I will post each one and I need to see where you are inserting this code:

Startup Default theme

Startup Shutdown code:

Pause code:

 

Try this for your startup theme:

<?xml version="1.0" encoding="UTF-8"?>
<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" mc:Ignorable="d" d:DesignHeight="562" d:DesignWidth="1000" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" FocusVisualStyle="{x:Null}" BorderThickness="0" Margin="0" Padding="0" Background="#000">
   <Canvas Name="Canvas">
<TextBlock x:Name="GameBackgrounds" Visibility="Collapsed">
        <TextBlock.Text>
          <MultiBinding StringFormat="{}pack://siteoforigin:,,,/Themes/Unified Redux/Images/GameBackgrounds/{0}/{1}.png">
            <Binding Path="SelectedGame.Platform" />
            <Binding Path="SelectedGame.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}" />      
     <Grid Height="{Binding ElementName=Canvas, Path=ActualHeight}" Width="{Binding ElementName=Canvas, Path=ActualWidth}">
         <Grid.RowDefinitions>
            <RowDefinition Height="10*" />
            <RowDefinition Height="2*" />
            <RowDefinition Height="18*" />
            <RowDefinition Height="10*" />
            <RowDefinition Height="18*" />
            <RowDefinition Height="2*" />
            <RowDefinition Height="25*" />
            <RowDefinition Height="15*" />
         </Grid.RowDefinitions>
         <Grid.ColumnDefinitions>
            <ColumnDefinition Width="15*" />
            <ColumnDefinition Width="20*" />
            <ColumnDefinition Width="30*" />
            <ColumnDefinition Width="20*" />
            <ColumnDefinition Width="15*" />
         </Grid.ColumnDefinitions> 	 		 
         <Grid Grid.Row="8" Grid.Column="0" Grid.ColumnSpan="5" Background="#00000000" Panel.ZIndex="10">
            <Grid.RowDefinitions>
               <RowDefinition Height="94*" />
               <RowDefinition Height="3*" />
               <RowDefinition Height="3*" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
               <ColumnDefinition Width="{Binding LoadingWidth}" />
               <ColumnDefinition Width="{Binding LoadingEmptyWidth}" />
            </Grid.ColumnDefinitions>
            <Grid Grid.Row="0" Grid.RowSpan="2" Background="#880094FF" />
         </Grid>
      </Grid>
   </Canvas>
</UserControl>

 

Link to comment
Share on other sites

No it's still here ... look at faeran post he has the code that is needed where mine did not have it posted correctly and was just code without his implementation. If anyone wants what I modified with faeran's additional code I can post it and you can add it to your own setups if you like. I have no problem sharing it at all the theme is not mine was just using the Unified Redux and the startup/shutdown/pause are all the default themes that comes with LB.

On my setup I wanted that Unified Redux (HyperSpin) look for my Arcade systems and when selecting my platforms but for my consoles/computers/handhelds wanted the coverflow look. Faeran's code allowed me to convert my RocketLauncher fades much easier and organized and did not want them in the default LB art folders due to issues that the way LB handles the artwork media and this is much better way I was looking for my setup.

You guys can just add that section of his code to any theme pretty much and it will work just the same. All props to him he is the xaml master! Also a BIG thank you to wallmachine for mentioning about the correct names of the media as that fixed my issue I was having it not showing up.

Note: If you guys want CoverFlow view available with Unified Redux you need to edit the Theme settings and enable it as it is disabled by default.

 

Edited by Krakerman
  • Game On 1
Link to comment
Share on other sites

I was wondering if anyone knows how to display 2 different screenshots at the same time?

Currently I am using '{Binding BackgroundImagePath}' to display a background but I am trying to figure out how to access, screenshots, fanart, etc. More importantly how to make launchbox display screenshot1 and then screenshot2 so that they are never the same and then also set a fallback using fanart.

Anyway, I hope this is the right way to inquire. Please help if you can and thanks in advance.

Link to comment
Share on other sites

18 hours ago, cemfundog said:

I was wondering if anyone knows how to display 2 different screenshots at the same time?

Currently I am using '{Binding BackgroundImagePath}' to display a background but I am trying to figure out how to access, screenshots, fanart, etc. More importantly how to make launchbox display screenshot1 and then screenshot2 so that they are never the same and then also set a fallback using fanart.

Anyway, I hope this is the right way to inquire. Please help if you can and thanks in advance.

Unfortunately I think currently you would need a plugin for this. The plugin would have to get all the available screenshots, and then show two of them. I don't think there's a way to do it otherwise, though I could be wrong.

Link to comment
Share on other sites

Is it possible to bind ImageType to look for Clear Logos in another folder other than \LaunchBox\Themes\Default\Images\Platforms\Clear Logo\?

            <coverFlow:FlowControl x:Name="FlowControl" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="0" CoverFactory="{Binding CoverFactory}" ImageType="Clear Logo"
                CurveAmount="4.5" CameraZPosition="3.0" VisibleCount="14" PageSize="6" Spacing="1.0" ItemZPosition="1.0" SelectedItemZPosition="2.0" />

 

Link to comment
Share on other sites

On 11/13/2019 at 4:32 PM, wallmachine said:

Is it possible to bind ImageType to look for Clear Logos in another folder other than \LaunchBox\Themes\Default\Images\Platforms\Clear Logo\?


            <coverFlow:FlowControl x:Name="FlowControl" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="0" CoverFactory="{Binding CoverFactory}" ImageType="Clear Logo"
                CurveAmount="4.5" CameraZPosition="3.0" VisibleCount="14" PageSize="6" Spacing="1.0" ItemZPosition="1.0" SelectedItemZPosition="2.0" />

 

Not for use in the wheels, that I'm aware. Currently you can use any image in most places, but the FlowControl doesn't have that flexibility.

Link to comment
Share on other sites

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

Edited by Krakerman
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...