Jump to content
LaunchBox Community Forums
Jason Carr

XAML Tips and Tricks

Recommended Posts

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

Share this post


Link to post
Share on other sites
On 1/17/2020 at 4:54 AM, viking said:

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 ?? 😘

Unfortunately I don't think this exists currently. Of course users can turn the setting off, but that setting is currently not theme-specific.

  • Thanks 1

Share this post


Link to post
Share on other sites

Hi all - I'm working on porting a Maximus Arcade theme of mine I created years ago.  I was able to answer most of my own questions by watching all of Jason's videos and reading through all 37 (!) pages of this thread, as well as the documentation.  I have two outstanding questions at the moment.

  1. How do I eliminate the transition delay entirely from game videos?  I have the below set so if a video doesn't exist, an image will be used instead.  When switching between games, there's a delay in the video loading and the user sees the image underneath for a second or so.  Please let me know if there's a way to do this (someone mentioned that TransitionPresenter came with a delay naturally but didn't suggest an alternative...)
    <transitions:TransitionPresenter Grid.Row="1" Transition="{transitions:FadeTransition}" Content="{Binding ImageView}" />
    <transitions:TransitionPresenter Grid.Row="1" Content="{Binding ImageVideoView}" StretchVideo="true" IsContentVideo="true" />
  2. How do I change the font size for ListBox in the games view?  I've tried adding the following under ListBoxStyle in TextListView.xaml, but it has no effect.  I've seen some extremely complex and elaborate ways around this using plugins and such, but I'm hoping there's an easy way to just make the font smaller for lists due to the font I'm using...
    <Setter Property="FontSize" Value="2" />

Thank you in advance.  Here's a screenshot of my WIP theme "Wood Panels". (Also, @viking, what's a guy gotta do to get his hands on the source images for the TVs you used in your platform videos?)

woodpanels_wip_2020-01-31.jpg

  • Unusual Gem 1

Share this post


Link to post
Share on other sites

Welcome @BMovieBen. That theme looks sweet. :)

Per #1, the ImageVideoView will automatically use an image if a video isn't available, assuming that's turned on in the options. So you may not need to worry about it at all. The delay is not really customizable because it's there in order to make sure that the UI is a smooth experience and doesn't freeze while the video is loading up.

  • Thanks 1

Share this post


Link to post
Share on other sites

Hi @BMovieBen.

  1. If your issue is with the fade transition, which exposes behind the video. This is actually controlled by the BigBox user. The user can change what kind of transition they would like to see the video use. Your best option is to probably just make the space behind the video black. You could simply wrap the video around a grid and make the grid background black. Maybe something like this:
<Grid Background="Black" Grid.Row="1">
  <transitions:TransitionPresenter Content="{Binding ImageVideoView}" StretchVideo="true" IsContentVideo="true" />
</Grid>
  1. The easiest way I know of without a plugin is to open the "TextListView.xaml, find the listboxes (one for the index, one for the game titles) and expose the datatemplate. Here's an example to compare:
        <ListBox Name="Index" Style="{DynamicResource ListBoxStyle}" DockPanel.Dock="Left" Width="100" Visibility="{Binding IndexVisibility}">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding Path=Text}" FontSize="50" />
                </DataTemplate>
            </ListBox.ItemTemplate>
            <i:Interaction.Triggers>
                <i:EventTrigger EventName="MouseDoubleClick">
                    <cal:ActionMessage MethodName="OnEnter" />
                </i:EventTrigger>
            </i:Interaction.Triggers>
        </ListBox>
        <ListBox Name="Items" Style="{DynamicResource ListBoxStyle}">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <TextBlock FontSize="27">
                        <TextBlock.Text>
                            <PriorityBinding>
                                <Binding Path="Title"/>
                                <Binding Path="Text"/>
                            </PriorityBinding>
                        </TextBlock.Text>
                    </TextBlock>
                </DataTemplate>
            </ListBox.ItemTemplate>
            <i:Interaction.Triggers>
                <i:EventTrigger EventName="MouseDoubleClick">
                    <cal:ActionMessage MethodName="OnEnter" />
                </i:EventTrigger>
            </i:Interaction.Triggers>
        </ListBox>
Edited by faeran
Fix the code
  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Thank you both for the helpful and prompt responses!  For #1, I'll do as you both suggested and omit image entirely (leaving the background black) and let the user choose the transition for the video, assuming it will fall back to images if no videos are found.

For #2, That solution seems to cause other issues...either BigBox fires an exception saying "ItemTemplate" cannot be used more than once, or once you select a game, the game title shows at the top but all the text in the list below (play now, rate the game, etc.) is missing.

OK what's the more robust option to resize the font in a listbox with a plugin then?

Share this post


Link to post
Share on other sites
7 minutes ago, BMovieBen said:

Thank you both for the helpful and prompt responses!  For #1, I'll do as you both suggested and omit image entirely (leaving the background black) and let the user choose the transition for the video, assuming it will fall back to images if no videos are found.

For #2, That solution seems to cause other issues...either BigBox fires an exception saying "ItemTemplate" cannot be used more than once, or once you select a game, the game title shows at the top but all the text in the list below (play now, rate the game, etc.) is missing.

OK what's the more robust option to resize the font in a listbox with a plugin then?

Getting an error just means that there's a mistake in how you added the code to your TextListView.xaml

Do you want to post the code you have?

Share this post


Link to post
Share on other sites

I tried again - not getting an exception anymore...just the funkiness (see video for example)

Attached is my full TextListView.xaml

TextListView.xaml

Edited by BMovieBen
Switched from embedded to attached code document for post brevity.

Share this post


Link to post
Share on other sites
8 hours ago, BMovieBen said:

I tried again - not getting an exception anymore...just the funkiness (see video for example)

Here's my full TextListView.xaml (apologies for the length, I don't want to delete stuff I don't understand):

 

Thanks for the explanation and the video. My bad, I left something out of the code. I've edited the code above for the Listbox Name="Items", and it should work now.

  • Thanks 1

Share this post


Link to post
Share on other sites

OK I'm back.  I tried to get fancy with the list view (of course!), and I have come across two issues I could use help with.  The first is, I can't seem to change the font size of the Game Title on the sub-screen when you select a game from the list view, nor do I see where I can change it from all uppercase to normal case.

woodpanels-2020-02-05-22h42m26s056.thumb.png.9832ecaacb8a06d8381220ec314e6763.pngThe second issue is the funkyness that happens with games that have long titles when you scroll quickly through the games list, either normally or by using the index.  I don't know if the listbox is just sensitive and not to be messed with (which I definitely am doing), or if it's some kind of bug.

woodpanels-2020-02-05-22h45m13s665.thumb.jpg.5b049d8ec87619550b6c6402da9337db.jpgAttached is my latest TextListView.xaml file and below is the video capture in case that helps.

 

TextListView.xaml

Edited by BMovieBen
added some detail

Share this post


Link to post
Share on other sites

You could try to change the Title to TextWrapping="NoWrap" and see if that makes a difference

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