Mister Slimm Posted June 13, 2021 Share Posted June 13, 2021 (edited) I am not the original author of this lovely LaunchBox custom theme so I hope that they are okay with this. I have added Badges to the main view, and RetroAchievements score and Badges menu to the menu bar. I also fixed the Play/Edit/Configure/Delete buttons so that the text displayed correctly for me. I hope it works for you, too. NoshOnThisTwiceLB.zip Edited June 15, 2021 by Mister Slimm Quote Link to comment Share on other sites More sharing options...
Daliant Posted June 13, 2021 Share Posted June 13, 2021 Hi @Mister Slimm, great work on this theme. Is there a tutorial on how to add the badgets function to a theme? I would really like to be able to do it for the LBPlex theme. Quote Link to comment Share on other sites More sharing options...
Mister Slimm Posted June 14, 2021 Author Share Posted June 14, 2021 <ListView ItemsSource="{Binding Badges}" Background="Transparent" BorderThickness="0" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="-21,2,-21,0" Visibility="{Binding BoxVisibility}"> <ListView.ItemTemplate> <DataTemplate> <Image x:Name="BadgeImage" Source="{Binding Path=Icon, Converter={StaticResource ImageToSourceConverter}}" Width="20" Margin="0,0,0,5" RenderOptions.BitmapScalingMode="HighQuality" ToolTip="{Binding Name}" /> </DataTemplate> </ListView.ItemTemplate> <ListView.ItemContainerStyle> <Style TargetType="ListViewItem"> <Setter Property="SnapsToDevicePixels" Value="True" /> <Setter Property="Margin" Value="0" /> <Setter Property="Padding" Value="0" /> <Setter Property="Background" Value="Transparent" /> <Setter Property="BorderThickness" Value="0" /> <Setter Property="FocusVisualStyle" Value="{x:Null}" /> <Setter Property="Background" Value="Transparent" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type ListViewItem}"> <ContentPresenter x:Name="ContentPresenter" HorizontalAlignment="Stretch" VerticalAlignment="Top" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /> </ControlTemplate> </Setter.Value> </Setter> </Style> </ListView.ItemContainerStyle> </ListView> So I copied this section from the Default/BoxesContentView.xaml and pasted it into the BoxesContentView.xaml for the new theme in the same place. For NoshOnThisTwice LB, it went at the end of this element just before the closing /Grid tag: <ListView.ItemTemplate> <DataTemplate> <Grid Margin="{Binding Margin}"> Quote Link to comment Share on other sites More sharing options...
Daliant Posted June 14, 2021 Share Posted June 14, 2021 Thank you so much @Mister Slimm, but seems LBPlex need more config to show the badges. I followed your instructions, but have a lot of exceptions when launch Launchbox. ? Quote Link to comment Share on other sites More sharing options...
Mister Slimm Posted June 14, 2021 Author Share Posted June 14, 2021 Right, yeah, I had that, too! You have to add this line to the UserControl element at the top of the file (I added it after the xmlns:controls line): xmlns:windows="clr-namespace:Unbroken.LaunchBox.Windows;assembly=Unbroken.LaunchBox.Windows" I do not remember if I had to do anything else. Quote Link to comment Share on other sites More sharing options...
Daliant Posted June 15, 2021 Share Posted June 15, 2021 HI @Mister Slimm, still having some issues adding this line. I think LBPlex is not compatible with badges.... It's a shame because it's my favorite theme. I guess I'll have no choice but to change the theme if I want the badges. Thanks for your kindly help. Quote Link to comment Share on other sites More sharing options...
Mister Slimm Posted June 15, 2021 Author Share Posted June 15, 2021 Ah! This is what happens when I try to remember all the steps I went through. We also have to add the following entry to the UserControl.Resources element: <windows:ImageToSourceConverter x:Key="ImageToSourceConverter" x:Name="ImageToSourceConverter"/> I will set up a new post with an updated LBPlex. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.