tbrittain / SmbExplorerCompanion

Baseball-Reference style desktop application for Super Mega Baseball 4 franchise playthroughs
MIT License
2 stars 0 forks source link

Explicit DataGrid column definitions #21

Closed tbrittain closed 1 year ago

tbrittain commented 1 year ago

We will eventually want to explicitly create columns. This would give us control over the rounding, plus if we include certain metadata about each stat, we could display it there. Such as if the given player led the leagues in HR for a season, we could bolden that stat and add a key

<DataGrid ItemsSource="{Binding YourCollection}" AutoGenerateColumns="False">
    <DataGrid.Columns>
        <!-- Other columns here... -->
        <DataGridTemplateColumn Header="YourColumnName">
            <DataGridTemplateColumn.CellTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding YourDoublePropertyName, StringFormat=N3}" />
                </DataTemplate>
            </DataGridTemplateColumn.CellTemplate>
        </DataGridTemplateColumn>
        <!-- Other columns here... -->
    </DataGrid.Columns>
</DataGrid>

Grids included in this:

tbrittain commented 1 year ago

Grids included in this:

  1. PlayerOverview page
  2. TeamOverview page
  3. TeamSeason page