Jump to content
LaunchBox Community Forums

XAML Tips and Tricks


Recommended Posts

3 hours ago, Jass_167 said:

sorry, it's not a theme, it's a game details view. so basically, what I'm trying to do is edit my game details list to move items over and a image. I have pictures here for better understanding.

 

 

Well it is a theme as the GameDetailsView is typically theme specific. So knowing what exact theme you are using is helpful. Another reason to know is if it is a theme made with the Community Theme Creator you may be able to easily edit it (if the creator released the CTC files) in the Theme Creator. Otherwise it would be a manual edit. Off-hand I do not know what theme that is by the images. 

What items are you trying to move and exactly where to? Also what image type are you trying to add and where in the canvas. 

Link to comment
Share on other sites

So I have a theme im creating in CTC but the gamesdetailview came from the default of “Colorful”. So I highlighted in one image where it is located now. Which is the top right. In the next image it is placed under the text scroll. For the image type it would be a png image. The image would be placed under the text scroll next to the badges.

Link to comment
Share on other sites

  • 2 weeks later...

 CTC 2.5 allows you to place the recent games filter list in your theme, but it's only for size and placement purposes.  

 From lots of testing, it looks like the file 'ThumbnailListView.xaml' controls the appearance.  The one that gets put in my theme by CTC 2.5 has issues with the bottom of the boxes being cropped.  When I replace it with the 'ThumbnailListView.xaml' from default theme, I don't have that cropping issue any more.  Also, the filter list title now shows where before it did not.

 So one thing solved - more or less.

 How do I change the navigation direction to the list?  Right now it's DOWN, but the recent games filter list is above my wheel.  So I want navigation to be UP, not DOWN.

image.thumb.png.459af5658ba05c368ef947b25b9dfb3b.png

Rob

 

Edited by Rob_G
Link to comment
Share on other sites

hi all, did my first test-theme for my 3:4 vertical (tate-mode) machine that should only run shmups in Tate mode.Everything works fine but i face an issue with the selection for different versions in it. I create the theme 90° rotatet, but the popup for  the "additional application/version" popup is still in normal-rotated (yoko) mode. Couldnt find in the CTC. Anyone know how change the look and placement of the "Additional-App/Version" popup?

 

Link to comment
Share on other sites

Is is possable to add colour conditions to selected game in the wheel in the text games view?   I want it match the colour conditions i have set for all the text on other platforms.  I've tried in CTC 2.5 but it always uses the default colour thats set so i didnt know if it had to be set up directly in the Style source xaml?

983279395_Screenshot(203).thumb.png.d27676486c6e52914b240b24db31ec0d.png

 

Edited by PaulyC
Link to comment
Share on other sites

3 hours ago, PaulyC said:

Is is possable to add colour conditions to selected game in the wheel in the text games view?   I want it match the colour conditions i have set for all the text on other platforms.  I've tried in CTC 2.5 but it always uses the default colour thats set so i didnt know if it had to be set up directly in the Style source xaml?

983279395_Screenshot(203).thumb.png.d27676486c6e52914b240b24db31ec0d.png

 

i broke this with 2.5, i sent you a test build

  • Thanks 1
Link to comment
Share on other sites

 I added a random game display to my theme, but of course it's just static and doesn't do anything.  I wish Big Box had a random game listbox like it does for recent and favorite games.  Then whenever a platform or playlist is chosen, a random game can be shown and chosen if desired.  I know there's been a lot of previous discussion about a random game picker, but I guess it never gained much traction for BigBox to implement?  

 Unless anyone has some thoughts to share?  

Rob

 

Untitled.jpg

Link to comment
Share on other sites

  • 7 months later...
13 hours ago, The Mask said:

How do I fix this (viewing default theme)?

Clipboard01.png

Don't think this has ever been possible unfortunately, although I still like to use Visual Studio for its intelliSense.

26 minutes ago, The Mask said:

Or does anyone know how to have the game names display beside every game in the vertical wheel or know of a theme that does so?

Clipboard01j.png

This is possible using a FlowControl item template. I feel like you can see an example of this inside of the Documentation.pdf which is in your LaunchBox\Themes folder.

You can add a textblock that looks something like this:

<TextBlock Text="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type coverFlow:FlowContext}}, Path=DataContext.Title}" />

 

  • Like 1
Link to comment
Share on other sites

18 hours ago, faeran said:

Don't think this has ever been possible unfortunately, although I still like to use Visual Studio for its intelliSense.

This is possible using a FlowControl item template. I feel like you can see an example of this inside of the Documentation.pdf which is in your LaunchBox\Themes folder.

 

It use to work before the 3rd major update. since, it has become very hard to code because it use to tell me if something was wrong and the image not showing use to be a sign that it would crash and it helps me determine which control goes where.

 

18 hours ago, faeran said:

 

This is possible using a FlowControl item template. I feel like you can see an example of this inside of the Documentation.pdf which is in your LaunchBox\Themes folder.

You can add a textblock that looks something like this:

<TextBlock Text="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type coverFlow:FlowContext}}, Path=DataContext.Title}" />

 

Thanks! This works but it replaces the image. here's what I have so far if you would be ever so kind:

 

<coverFlow:FlowControl.FlowTemplate>
      <DataTemplate>
         <coverFlow:FlowContext>
              <TextBlock Text="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type        coverFlow:FlowContext}}, Path=DataContext.Title}" />
         </coverFlow:FlowContext>
      </DataTemplate>
</coverFlow:FlowControl.FlowTemplate>

How to edit so that it is along side the image?

Edited by The Mask
Link to comment
Share on other sites

41 minutes ago, The Mask said:

It use to work before the 3rd major update. since, it has become very hard to code because it use to tell me if something was wrong and the image not showing use to be a sign that it would crash and it helps me determine which control goes where.

 

I feel like there was some attempts to make this work back in the day that didn't pan out. Intellisense should inform you if something in the code looks out of place and needs fixing, it's one of the reasons I use VS.

43 minutes ago, The Mask said:

How to edit so that it is along side the image?

I really only provided the textblock code that can be used inside of the template, since it requires some extra stuff in it to make it functional. You'll need to use a FlowImage to get the clear logo back, and use a Grid with two Columns to get them next to each other.

Link to comment
Share on other sites

<coverFlow:FlowControl.FlowTemplate>
      <DataTemplate>
         <coverFlow:FlowContext>
           	<FlowImage  *****insert flowimage sub controls here***** />
              <TextBlock Text="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type        coverFlow:FlowContext}}, Path=DataContext.Title}" />
         </coverFlow:FlowContext>
      </DataTemplate>
</coverFlow:FlowControl.FlowTemplate>

Is that the correct way to use flowimage in this instance?

Link to comment
Share on other sites

28 minutes ago, The Mask said:
<coverFlow:FlowControl.FlowTemplate>
      <DataTemplate>
         <coverFlow:FlowContext>
           	<FlowImage  *****insert flowimage sub controls here***** />
              <TextBlock Text="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type        coverFlow:FlowContext}}, Path=DataContext.Title}" />
         </coverFlow:FlowContext>
      </DataTemplate>
</coverFlow:FlowControl.FlowTemplate>

Is that the correct way to use flowimage in this instance?

It would be more like this:
 

<coverFlow:FlowImage  />

 

Link to comment
Share on other sites

<coverFlow:FlowControl.FlowTemplate>
                                    <DataTemplate>
                                        <coverFlow:FlowContext>
                                            <coverFlow:FlowImage ImageType="Backgrounds" />
                                            <TextBlock Text="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type coverFlow:FlowContext}}, Path=DataContext.Title}" />
                                        </coverFlow:FlowContext>
                                    </DataTemplate>
                                </coverFlow:FlowControl.FlowTemplate>

Trying to find the right format. When I use this, it doesnt show text anymore nor any picture. If i take it out of flowcontext and put it str8 into datatemplate, it just crashes

Edited by The Mask
Link to comment
Share on other sites

31 minutes ago, The Mask said:
<coverFlow:FlowControl.FlowTemplate>
                                    <DataTemplate>
                                        <coverFlow:FlowContext>
                                            <coverFlow:FlowImage ImageType="Backgrounds" />
                                            <TextBlock Text="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type coverFlow:FlowContext}}, Path=DataContext.Title}" />
                                        </coverFlow:FlowContext>
                                    </DataTemplate>
                                </coverFlow:FlowControl.FlowTemplate>

Trying to find the right format. When I use this, it doesnt show text anymore nor any picture. If i take it out of flowcontext and put it str8 into datatemplate, it just crashes

Well, it doesn't look like you wrapped the items in a Grid, or set up the Grid Columns to get what you are after. I'm also going to guess you'll need to wrap the image in a container that's a static size, or else you'll end up with results you were not expecting. You may also want to format the TextBlock.

If you need some help on how to utilize a Grid, there should be lots of examples in different themes. Also since it's basic WPF, google would definitely have a wealth of information.

Link to comment
Share on other sites

24 minutes ago, The Mask said:

the coverflow,flowcontrol is in a grid. the code i used above i put inside of the coverflow.flowcontrol (wheel).

So, here's an example of what I'm referring to, just know that this is not a completed code, but it gets you a bit closer. Then you can edit it and style and position things the way you want.

<coverFlow:FlowControl.FlowTemplate>
                                    <DataTemplate>
                                        <coverFlow:FlowContext>
                                          <Grid Background="Transparent" Height="300" Width="600">
                                            <Grid.ColumnDefinitions>
                                              <ColumnDefinition Width="1*"/>
                                              <ColumnDefinition Width="1*"/>
                                            </Grid.ColumnDefinitions>
                                            <coverFlow:FlowImage Grid.Column="0" ImageType="Backgrounds" />
                                            <TextBlock Grid.Column="1" Text="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type coverFlow:FlowContext}}, Path=DataContext.Title}" />
                                          </Grid>
                                        </coverFlow:FlowContext>
                                    </DataTemplate>
                                </coverFlow:FlowControl.FlowTemplate>

 

  • Like 1
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...