Styling experiments

This commit is contained in:
Torben Nehmer 2025-01-26 13:50:30 +01:00
parent bfdbc347eb
commit c2f710bf67
No known key found for this signature in database
2 changed files with 19 additions and 3 deletions

View File

@ -14,5 +14,18 @@
<FluentTheme DensityStyle="Compact" />
<materialIcons:MaterialIconStyles />
<StyleInclude Source="avares://Avalonia.Controls.DataGrid/Themes/Fluent.xaml"/>
<Style Selector="DataGridColumnHeader">
<Setter Property="Margin" Value="0" />
<Setter Property="Padding" Value="0" />
<Setter Property="MinHeight" Value="20" />
</Style>
<Style Selector="DataGridCell">
<Setter Property="Margin" Value="0" />
<Setter Property="Padding" Value="0" />
<Setter Property="MinHeight" Value="20" />
</Style>
</Application.Styles>
</Application>

View File

@ -7,14 +7,17 @@
x:Class="StarsAssistant.Views.BuColView"
x:DataType="vm:BuColViewModel">
<DataGrid x:Name="PlanetsGrid"
ItemsSource="{Binding PlayerPlanets}"
SelectedItem="{Binding SelectedPlanet}"
GridLinesVisibility="All"
FrozenColumnCount="1"
BorderThickness="1" BorderBrush="Gray">
ColumnWidth="Auto"
RowHeight="24" FontSize="12"
BorderThickness="1" BorderBrush="Gray"
>
<DataGrid.Columns>
<DataGridTextColumn Header="Planet" Binding="{Binding Name}" />
<!-- Class -->