bbweiners Posted March 7, 2018 Share Posted March 7, 2018 Hi, Is there a way to center the text in the games list? I'm working on some themes and it would be nice to not have the games list text be completely aligned to the left. Thanks Quote Link to comment Share on other sites More sharing options...
mat091084 Posted March 8, 2018 Share Posted March 8, 2018 Within the Theme folder there will be a Views folder, find the relevant .xaml file for your desired view and align to "Center". Quote Link to comment Share on other sites More sharing options...
eatkinola Posted March 12, 2018 Share Posted March 12, 2018 On 3/8/2018 at 4:09 PM, mat091084 said: Within the Theme folder there will be a Views folder, find the relevant .xaml file for your desired view and align to "Center". Unfortunately for this list it's not as simple as that. I'm looking for a solution as well, getting close I hope. 1 Quote Link to comment Share on other sites More sharing options...
eatkinola Posted March 30, 2018 Share Posted March 30, 2018 On 3/7/2018 at 3:11 PM, bbweiners said: Is there a way to center the text in the games list? I'm working on some themes and it would be nice to not have the games list text be completely aligned to the left. This works for me, using styles (particularly the HorizonatalAlignment): <!-- LISTBOX: BASE STYLE (PLUS TEXTBLOCK TEMPLATE) --> <Style x:Key="ListBoxStyle_BASE" TargetType="ListBox"> <Setter Property="ItemContainerStyle" Value="{StaticResource ListBoxItemStyle}" /> <Setter Property="BorderBrush" Value="Transparent" /> <Setter Property="Background" Value="Transparent" /> <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Hidden" /> <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Hidden" /> <Setter Property="BorderThickness" Value="0" /> <Setter Property="Padding" Value="0" /> <Setter Property="Margin" Value="0" /> <Setter Property="FocusVisualStyle" Value="{x:Null}" /> </Style> <Style x:Key="ListBoxStyle_BASETB" TargetType="TextBlock"> <Setter Property="Padding" Value="4" /> <Setter Property="FontSize" Value="{StaticResource FluxListFontSize}" /> <Setter Property="TextTrimming" Value="CharacterEllipsis" /> <Setter Property="HorizontalAlignment" Value="Center" /> </Style> <!-- LISTBOX: SYSMENU (LIST ITEM = TEXT) --> <Style x:Key="ListBoxStyle_SYST" TargetType="ListBox" BasedOn="{StaticResource ListBoxStyle_BASE}"> <Setter Property="ItemTemplate"> <Setter.Value> <DataTemplate> <TextBlock Text="{Binding Path=Text}" Style="{StaticResource ListBoxStyle_BASETB}" /> </DataTemplate> </Setter.Value> </Setter> </Style> Then in SystemView.xaml: <ListBox Name="MenuItems" Style="{StaticResource ListBoxStyle_SYST}" /> Basically, you are assigning your own DataTemplate, to override that used by default in BigBox. It's a bit roundabout but works. There might be a simpler way, but I could not find one. Probably this weekend, I will post a new theme called FluxCRT that uses this list centering trick extensively -- it's a little different for certain views, so perhaps looking at the xaml of FluxCRT will help. Quote Link to comment Share on other sites More sharing options...
bbweiners Posted March 30, 2018 Author Share Posted March 30, 2018 That's awesome! Thanks! Quote Link to comment Share on other sites More sharing options...
eatkinola Posted April 1, 2018 Share Posted April 1, 2018 On 3/29/2018 at 10:58 PM, bbweiners said: That's awesome! Thanks! No problem! FYI just released FluxCRT which contains examples of this for TextFiltersView, TextGamesView (see TextListView), OptionsView, and SystemView. 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.