Jump to content
LaunchBox Community Forums
Jason Carr

XAML Tips and Tricks

Recommended Posts

4 hours ago, Jason Carr said:

 

I honestly don't know; you should be able to bind to the SelectedGame.VideoPath property, but I haven't tested it.

Im getting an error saying no SelectedGame.VideoPath. im assuming i just dont know how to bind it correctly, can someone provide an example.

Share this post


Link to post
Share on other sites

Should be like this I believe:

<videos:VideoControl VideoPath="{Binding SelectedGame.VideoPath}" />

That's from memory but I think that's it. ;)

Share this post


Link to post
Share on other sites
1 hour ago, Jason Carr said:

Should be like this I believe:


<videos:VideoControl VideoPath="{Binding SelectedGame.VideoPath}" />

That's from memory but I think that's it. ;)

i hope someone can chime in on this for transitions and stretching, as using Binding ImageVideoView does not allow you to stretch it nor do transitions work for VideoControl.

<videos:VideoControl VideoPath="{Binding SelectedGame.VideoPath}" Content="{Binding ImageVideoView}" />

Edited by wallmachine

Share this post


Link to post
Share on other sites

is it possible to remove 'Recen't and 'Favorite' text i can't find the view/style for it... or even customize it at all to set a certain amount of boxes to display?


                <transitions:TransitionPresenter TransitionSelector="{Binding TopBoxesTransitionSelector}" Content="{Binding TopBoxesView}" />
                <transitions:TransitionPresenter TransitionSelector="{Binding BottomBoxesTransitionSelector}" Content="{Binding BottomBoxesView}" />

Edited by wallmachine

Share this post


Link to post
Share on other sites
17 hours ago, wallmachine said:

i hope someone can chime in on this for transitions and stretching, as using Binding ImageVideoView does not allow you to stretch it nor do transitions work for VideoControl.

<videos:VideoControl VideoPath="{Binding SelectedGame.VideoPath}" Content="{Binding ImageVideoView}" />

Eatkinola's plugin fixes this or you can remove the images and have them read from somewhere else and use backgroundview instead. Background view allows stretching automatically. I posted another method another ways back in this thread about using scaling. But the problem with that is that it only works correctly in the resolution you code it in.

Share this post


Link to post
Share on other sites
36 minutes ago, wallmachine said:

is it possible to remove 'Recen't and 'Favorite' text i can't find the view/style for it... or even customize it at all to set a certain amount of boxes to display?

Look in ThumbnailListView.xaml -- example from Minimal-AO:

<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:cal="http://www.caliburnproject.org"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="300" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
    <DockPanel HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
        <!-- NOTE: Collapsed/hid the Title (Recent/Favorites) so I could create my own title... -->
        <TextBlock Name="Title" DockPanel.Dock="Top" Foreground="White" FontFamily="Calibri" Visibility="Collapsed"/>
        <ListBox Name="Items" Style="{DynamicResource ThumbnailListBoxStyle}" SelectedItem="{Binding SelectedItem}">
            <i:Interaction.Triggers>
                <i:EventTrigger EventName="MouseDoubleClick">
                    <cal:ActionMessage MethodName="OnEnter" />
                </i:EventTrigger>
            </i:Interaction.Triggers>
        </ListBox>
    </DockPanel>
</UserControl>

 

  • Like 1

Share this post


Link to post
Share on other sites
6 minutes ago, shinra358 said:

Eatkinola's plugin fixes this or you can remove the images and have them read from somewhere else and use backgroundview instead. Background view allows stretching automatically. I posted another method another ways back in this thread about using scaling. But the problem with that is that it only works correctly in the resolution you code it in.

yeah i know the plugin fixes it but it crashes. if the bigbox volume is set to 0%

Share this post


Link to post
Share on other sites

Is it possible to do the following with PlatformWheel1FiltersView.xaml?

Example: to enter the fav wheel use up arrow and then to cycle through use right or left arrow, then for the recent wheel press down and then left and right arrow to cycle through list.

<transitions:TransitionPresenter TransitionSelector="{Binding TopBoxesTransitionSelector}" Content="{Binding TopBoxesView}" />

<transitions:TransitionPresenter TransitionSelector="{Binding BottomBoxesTransitionSelector}" Content="{Binding BottomBoxesView}" />

 

Also does anyone know how to remove the semi-colon from Genres and place a comma , or something else in-between?

Edited by wallmachine

Share this post


Link to post
Share on other sites

With <transitions:TransitionPresenter TransitionSelector="{Binding TopBoxesTransitionSelector}" Content="{Binding TopBoxesView}" /> is it possible to display a certain amount of favorites to list?

Share this post


Link to post
Share on other sites

I have this:

<transitions:TransitionPresenter Grid.Column="1" Grid.Row="5" TransitionSelector="{Binding BottomBoxesTransitionSelector}" Content="{Binding BottomBoxesView}"/>


How can i make the Boxes adapt to the grid? so if the grid is bigger the boxes are also bigger, but maintaining aspect ratio. Thanks.

Share this post


Link to post
Share on other sites

Maybe on the next wishlist for Launchbox, we have a "drag and drop" Theme maker for others to use to make themes that dont know or are comfortable with XAML?

Share this post


Link to post
Share on other sites

I've got 2 issues I'm hoping someone knows how to solve:

  1. I need a way to change the text size of the text list box. Any changes I try to make in the ListBoxItemStyle.xaml or ListBoxStyle.xaml seem to not be effective.
  2. Anyone notice that the text list box seems to never have the border on the right side? I need to get it to show, but I can't seem to figure out how. You can see that it's missing if you try to add a border around each text item, or try to add a corner radius. The right side seems to always be transparent/missing, while the other sides show.

Any help is appreciated.

Share this post


Link to post
Share on other sites

I'm working on a theme and would like to use the images in the arcade section as well, like cabinet, marquee and controls for instance. Anyone know which code I should use for a selected game? At the moment I'm using the images for Arcade Cabinet as Front Cart but this is very limited as I need big cabinet images and smaller Cart images seperatly in the same layout. Any help would be very appreciated! :)

!Update!: Never mind I use the 3D Cart placeholder for Arcade Cabinets now.

Edited by Mr. RetroLust

Share this post


Link to post
Share on other sites

@Jason Carr  Have you messed around with PlaneProjection?  I get unknown member type .PlaneProjection :-(

 

     <Image.Projection>
      <PlaneProjection RotationX="-35"   />
     </Image.Projection>

Edited by y2guru

Share this post


Link to post
Share on other sites
2 hours ago, y2guru said:

@Jason Carr  Have you messed around with PlaneProjection?  I get unknown member type .PlaneProjection :-(

 

     <Image.Projection>
      <PlaneProjection RotationX="-35"   />
     </Image.Projection>

As far as I can immediately tell, PlaneProjection is only for Silverlight, so it doesn't work in WPF.

Share this post


Link to post
Share on other sites
27 minutes ago, wallmachine said:

does anyone know how to achieve this?

 

 

Keeping the selected title centered? I've requested this feature a few times before and still waiting :)

Share this post


Link to post
Share on other sites
32 minutes ago, bundangdon said:

Keeping the selected title centered? I've requested this feature a few times before and still waiting :)

yeah same... + change the colour of selected title, only a select few know how to create plugins.

Edited by wallmachine

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