Jump to content
LaunchBox Community Forums

XAML Tips and Tricks


Recommended Posts

It's already there.

I'm questioning myself if the storyboard.targetproperty is written correctly and if I have the correct routedevent as well?

 

And for testing, this code is located in the TextListView.xaml within the listbox named 'Items'.

Edited by shinra358
Link to comment
Share on other sites

1 hour ago, shinra358 said:

ok, hit me up when you get home.

Nosh did the pulsing selector in his theme. He put all his animations and such in the ListBoxItemStyle.xaml in the Styles folder. It makes sense now because that listbox's style is set to use it. Here's his ListBoxItemStyle file, you should be able to figure it out from this.

ListBoxItemStyle.xaml

 

Or, remove the Style={DynamicResource ListBoxStyle}" from your listbox so it doesn't get its styling from there.

Link to comment
Share on other sites

Before I went to sleep last night, I came up with this:

Spoiler

 


<Border Grid.Row="5">
                    <Border.Effect>
                        <DropShadowEffect BlurRadius="10" Color="Black" Direction="315" Opacity="1.0" RenderingBias="Performance" ShadowDepth="7"/>
                    </Border.Effect>
                    <ListBox Name="Items" Style="{DynamicResource ListBoxStyle}" FontFamily="{StaticResource FontMain}">
                        <ListBox.LayoutTransform>
                            <TransformGroup>
                                <ScaleTransform ScaleX="1.5"/>
                                <SkewTransform/>
                                <RotateTransform/>
                                <TranslateTransform/>
                            </TransformGroup>
                        </ListBox.LayoutTransform>
                        <i:Interaction.Triggers>
                            <i:EventTrigger EventName="MouseDoubleClick">
                                <cal:ActionMessage MethodName="OnEnter" />
                            </i:EventTrigger>
                        </i:Interaction.Triggers>                       
                        <ListBox.Effect>
                            <BlurEffect Radius="2"/>
                        </ListBox.Effect>
                        <ListBox.ItemContainerStyle>
                            <Style TargetType="ListBoxItem">
                                <Style.Triggers>
                                    <Trigger Property="IsSelected" Value="True" >
                                        <Setter Property="FontWeight" Value="Bold" />
                                        <Setter Property="Background" Value="Transparent" />
                                        <Setter Property="Foreground" Value="White" />
                                        <Trigger.EnterActions>
                                            <BeginStoryboard>
                                                <Storyboard>
                                                    <DoubleAnimation
                                                          Storyboard.TargetProperty="(UIElement.Opacity)"
                                                          BeginTime="0:0:0" From="0.25" To="0.85" Duration="0:0:0.5" AutoReverse="True"
                                                          RepeatBehavior="Forever" />
                                                </Storyboard>
                                            </BeginStoryboard>
                                        </Trigger.EnterActions>
                                        <Trigger.ExitActions>
                                            <BeginStoryboard>
                                                <Storyboard>
                                                    <DoubleAnimation
                                                          Storyboard.TargetProperty="Opacity"
                                                          BeginTime="0:0:0" To="1" Duration="0:0:0"/>
                                                </Storyboard>
                                            </BeginStoryboard>
                                        </Trigger.ExitActions>
                                    </Trigger>
                                </Style.Triggers>
                                <Style.Resources>
                                    <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Transparent"/>
                                    <RadialGradientBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Opacity="0.55">
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <ScaleTransform CenterY="0.5" CenterX="0.5" ScaleX="1.7" ScaleY="1.1"/>
                                                <SkewTransform CenterY="0.5" CenterX="0.5"/>
                                                <RotateTransform CenterY="0.5" CenterX="0.5"/>
                                                <TranslateTransform/>
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop Color="White" Offset="1"/>
                                        <GradientStop Color="Transparent"/>
                                    </RadialGradientBrush>
                                </Style.Resources>
                            </Style>
                        </ListBox.ItemContainerStyle>
                    </ListBox>
                </Border>

 

That pulses the highlighter AND the word that it highlights. I only want the highlighter to pulse but not the word. I just downloaded nosh's theme to check what it looks like, it does both the word and highlighter like I've already gotten here unfortunately.

 

Edit: Hmm, I see in the file that it can directly effect both separately. Let's see...

Edit2: I've replaced he flash section to my theme in that same xaml (deleting the stuff I made at first) and nothing happened. Then I copy and pasted the whole file, still nothing happened. This and the blurred backgrounds I just can't get xD Is there any changes you would make to the new code above to achieve what is desired?

Edited by shinra358
Link to comment
Share on other sites

  • 2 weeks later...

@Lordmonkus @CriticalCid @Jason Carr  can I retrieve the platforms default emulator? (as I see it displayed via the default platform view, i think its TextFiltersView)

I tried variations of the following but no Bueno

Text" Value="{Binding Path=SelectedPlatform.DefaultEmulator}"

Text" Value="{Binding Path=SelectedPlatform.DefaultEmulation}"

 

Edited by y2guru
included tags
Link to comment
Share on other sites

Video Playback Tags...

I like to play all themes and Game videos in full screen behind a theme in Full screen.   This works in the Game Details but not within the wheel, platform or coverflow views.   Which XML tag and Control is associated with these and is their an an example?   

Thanks

Link to comment
Share on other sites

<transitions:TransitionPresenter TransitionSelector="{Binding DetailsTransitionSelector}" Content="{Binding DetailsView}" TextBlock.FontFamily="{StaticResource FontMain}">

How or where do I change the font color of the listbox in this container? This is the details code for the details in the platform view.

Link to comment
Share on other sites

For those of you who want to stretch you gifs:

 

Put this in UserControls before the mc line:

xmlns:gif="clr-namespace:WpfAnimatedGif;assembly=Unbroken.LaunchBox.Wpf"

 

Then add your gif:

<Image gif:ImageBehavior.AnimatedSource="pack://siteoforigin:,,,/Themes/PSP-XE/Images/bbc91a627613e925aea340252646d569.gif" Name="PlatformBG" Stretch="Fill" RenderTransformOrigin="0,0">

RenderTransformOrigin is the point of which your stretching is originated. So in this example, 0,0 means that stretching is coming from the top left corner of your border or whatever your image is being held in.

 

Directly beneath the above code line (no empty lines), place this:

<Image.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleX="2.34" ScaleY="2.25"/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform/>
                </TransformGroup>
            </Image.RenderTransform>
        </Image>

ScaleX is the value that stretches the image/gif horizontally. ScaleY does the vertical stretching. 185?cb=20091030024048

Tadaaa!

 

Clipboard02.thumb.jpg.19b6db6fd02f9a12affe938cae69f62a.jpg

Edited by shinra358
  • Like 1
Link to comment
Share on other sites

Hello, Last monday i've started to learn about big box themes and there's some things that i don't find where i can change it. I'm looking the codes from Viking's StationEmulation, since i've made some themes for emulationstation and i want to convert it to launchbox.

I'm messing around in PlatformWheel1FiltersView.xaml and i could change the background images and removed the transition effect, because i want the background images to just appear without any effect. The thing is that they took some time to change from the system i'm in to the next system and i can't find where i change it to appear instantly, because i want to remove the logos and leave just the background image.

Here's my code so far:
 

<transitions:TransitionPresenter Content="{Binding BackgroundView}" Height="{Binding ElementName=Canvas, Path=ActualHeight}" Width="{Binding ElementName=Canvas, Path=ActualWidth}" IsContentVideo="False" />

Can anyone help?

thanks

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