Jump to content
LaunchBox Community Forums

XAML Tips and Tricks


Recommended Posts

@Jason Carr   I'm back in XAML mode,  so my question is in regards to Device Images... specifically when selecting a game, is there a binding value I use to acquire the selected/active game's platform device image path?

Used in a platform View:                            Source="{Binding Path=ActivePlatform.DeviceImagePath}"

Alternative in game view?                          Source="{Binding Path=ActiveGamePlatform.DeviceImagePath}" (I know it doesn't work)

I would hate to point to my own folder containing the device images as that defeats the purpose of having common images in 1 location, so hopefully you have an easy answer.

 

Link to comment
Share on other sites

28 minutes ago, y2guru said:

@Jason Carr   I'm back in XAML mode,  so my question is in regards to Device Images... specifically when selecting a game, is there a binding value I use to acquire the selected/active game's platform device image path?

Used in a platform View:                            Source="{Binding Path=ActivePlatform.DeviceImagePath}"

Alternative in game view?                          Source="{Binding Path=ActiveGamePlatform.DeviceImagePath}" (I know it doesn't work)

I would hate to point to my own folder containing the device images as that defeats the purpose of having common images in 1 location, so hopefully you have an easy answer.

 

Platform.DeviceImagePath should work, but it's not a proper binding, which means that it may not update as games change. It might still work for you though, so it's worth a shot.

Link to comment
Share on other sites

2 minutes ago, Jason Carr said:

Platform.DeviceImagePath should work, but it's not a proper binding, which means that it may not update as games change. It might still work for you though, so it's worth a shot.

worked like an absolute champ Jason!!  any other hidden bindings we should be aware of? ?

btw... separate topic, I would like to show you something that's been in development for 2 months,  @Rincewind has been graciously helping, if you're interested I would like to setup a twitch stream with the 3 or so of us.

Link to comment
Share on other sites

2 minutes ago, y2guru said:

worked like an absolute champ Jason!!  any other hidden bindings we should be aware of? ?

btw... separate topic, I would like to show you something that's been in development for 2 months,  @Rincewind has been graciously helping, if you're interested I would like to setup a twitch stream with the 3 or so of us.

Glad to hear it worked. :)

I'm currently running around like a chicken with my head cut off hunting bugs (and I'm bit a worn out to be honest), so if possible, I'd prefer if you could just send me a link or a screenshot or something first.

Link to comment
Share on other sites

1 minute ago, Jason Carr said:

Glad to hear it worked. :)

I'm currently running around like a chicken with my head cut off hunting bugs (and I'm bit a worn out to be honest), so if possible, I'd prefer if you could just send me a link or a screenshot or something first.

hahaha no worries and I didn't mean today.  I'll create a new youtube video and provide the link.  I appreciate the quick answer though and you'll see by the video why I needed it ?

  • Like 1
Link to comment
Share on other sites

1 hour ago, Jason Carr said:

Glad to hear it worked. :)

I'm currently running around like a chicken with my head cut off hunting bugs (and I'm bit a worn out to be honest), so if possible, I'd prefer if you could just send me a link or a screenshot or something first.

as promised Jason, heres the youtube video with your answer on display ?

 

 

  • Like 3
Link to comment
Share on other sites

3 minutes ago, Kondorito said:

@y2guru impressive work!

And even only being barebones I can already tell that this app/tool has A LOT of potential.

You are making theme creation available to a wider user base with no coding background.

Endless creative possibilities!

you are exactly right !!! there are some highly talented graphics artists on here and i know or hope that they could use this to realize their ideas.

Link to comment
Share on other sites

18 hours ago, Jason Carr said:

Wow, well this came out of nowhere! Very cool, and exciting. I bet there's a lot of people who would love to get their hands on that...

Following on from yesterdays video as i was pushed for time and i hadn't implemented box art.  There is a lot more going on with this theme editor than you may think... this video will demonstrate that platform specific overrides can be applied to a given view and at runtime they are realized.    It must be noted that the best way to achieve the desired look as you will see in the video is to simply change the default settings, i just didn't want to delete/change my default settings as i am still testing.

 

  • Like 2
Link to comment
Share on other sites

5 minutes ago, Rincewind said:

Loading custom backgrounds in to it that's good to see and the box art, and can your top bar and banner still be turned on

yes it can still be turned on, I just turned them off in this example as I didn't have other graphics to leverage with the video borders I imported

Link to comment
Share on other sites

I was just tweaking the game details page (TextGamesView) of the skin I've been working on and I was wondering if it was possible to have conditional layouts. That is, that the layout for at least a certain part of the page would be different depending on what kind of game the page is loading from. For instance, that the details page for an NES game would be set up slightly different than that of an SNES game or PS1 game (due to the different sizes/orientations of the covers, for example). Is that sort of thing possible? Or can the page use only one layout?

Edited by Jair
Link to comment
Share on other sites

  • 5 weeks later...

Is it possible to use bindings on Playlist views? Something like ActivePlaylist.Name would be very helpful. This is not on the documentation so i presume it's not implemented yet.

I really love the BigCouch theme but there are somethings i would like to add to it so i'm "frankensteining" it with some pieces of code to achieve the look I want.

Some computer systems are a bit tricky, requiring you to manually type some boot parameters in order to load the games. My memory isn't what it used to be so i need some post-its to remember those commands. This is what i'm doing for those systems, (never mind the instructions, i know those aren't for the Atari 800, it's just a background pic to check size and positioning.):

sQCxISf.jpg

This is for the Platforms view, the 3 help pages (usually just use 1 or 2 depending on how much info is needed) is just an Instructions.png file i put on the root folder of the platform's Images folder. This is the code to load it for the PlatformWheel2FiltersView on BigCouch:

<!-- INSTRUCTIONS OVERLAY PLATFORM-->
            <TextBlock x:Name="InstructionsPlatform" Visibility="Collapsed">
                <TextBlock.Text>
                    <MultiBinding StringFormat="{}pack://siteoforigin:,,,/Images/{0}/Instructions.png">
                        <Binding Path="ActivePlatform.Name" />
                    </MultiBinding>
                </TextBlock.Text>
            </TextBlock>
            <Image Source="{Binding Text, ElementName=InstructionsPlatform}" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Bottom" UseLayoutRounding="True" Width="873" Height="347" SnapsToDevicePixels="True" Stretch="Fill" />

This works great for platforms, however some systems use several types of media like floppies and cassettes,etc., so for those i create playlists to separate them, this is good for organization inside BigBox and to assign proper emulator's as well. For example, i have 3 distinct MESS emulators (cart, flop and cass) pointing to the same mame64.exe then I add the systems that use those kinds of media to the specific emulator. Like so:

Amstrad CPC

                   Emulator   |  Associated Platform |   Default Command-line Parameters

-Floppies: MESS (Flop)   |  Amstrad CPC  | cpc6128 -flop1

-Cassettes: MESS (Cass) |  Amstrad CPC  | cpc6128 -cass

Then i just need to choose the proper emulator when importing either cassette or floppy media.  However, some systems have different boot sequences depending on the type of media your trying to load so i would like to give instructions for them as well but I need the Bindings for the "playlist view". Is there a way to achieve this without something like ActivePlaylist.Name?

 

EDIT: Never mind ? The ActivePlatform.Name is the correct tag for the binding. I just had to add this block of code after the other one in order to load the Instructions.png from the Playlists folder. (Notice the StringFormat path)

<!-- INSTRUCTIONS OVERLAY PLAYLIST-->
            <TextBlock x:Name="InstructionsPlaylist" Visibility="Collapsed">
                <TextBlock.Text>
                    <MultiBinding StringFormat="{}pack://siteoforigin:,,,/Images/Playlists/{0}/Instructions.png">
                        <Binding Path="ActivePlatform.Name" />
                    </MultiBinding>
                </TextBlock.Text>
            </TextBlock>
            <Image Source="{Binding Text, ElementName=InstructionsPlaylist}" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Bottom" UseLayoutRounding="True" Width="873" Height="347" SnapsToDevicePixels="True" Stretch="Fill" />

 

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