Skip to content

Commit

Permalink
XAML styling
Browse files Browse the repository at this point in the history
  • Loading branch information
niels9001 authored and michael-hawker committed Aug 1, 2023
1 parent b1aac74 commit 186133a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion components/DataTable/samples/DataTableSample.xaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
<Page x:Class="DataTableExperiment.Samples.DataTableSample"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Expand Down
19 changes: 12 additions & 7 deletions components/DataTable/samples/DataTableVirtualizationSample.xaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
<Page x:Class="DataTableExperiment.Samples.DataTableVirtualizationSample"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Expand All @@ -13,7 +13,7 @@
VerticalAlignment="Top"
ItemsSource="{x:Bind InventoryItems}">
<ListView.Header>
<controls:DataTable ColumnSpacing="0">
<controls:DataTable ColumnSpacing="16">
<controls:DataColumn Content="Id" />
<controls:DataColumn CanResize="True"
Content="Name" />
Expand All @@ -28,15 +28,20 @@
<DataTemplate x:DataType="local:InventoryItem">
<!-- We set HorizontalAlignment to Left here as we're not stretching our content with a star column -->
<controls:DataRow HorizontalAlignment="Left">
<TextBlock Text="{x:Bind Id}" VerticalAlignment="Center" />
<TextBlock Text="{x:Bind Name}" VerticalAlignment="Center"/>
<TextBlock Text="{x:Bind Description}" VerticalAlignment="Center"/>
<TextBlock Text="{x:Bind Quantity}" VerticalAlignment="Center"/>
<TextBlock VerticalAlignment="Center"
Text="{x:Bind Id}" />
<TextBlock VerticalAlignment="Center"
Text="{x:Bind Name}" />
<TextBlock VerticalAlignment="Center"
Text="{x:Bind Description}" />
<TextBlock VerticalAlignment="Center"
Text="{x:Bind Quantity}" />
</controls:DataRow>
</DataTemplate>
</ListView.ItemTemplate>
<ListView.ItemContainerStyle>
<Style TargetType="ListViewItem" BasedOn="{StaticResource DefaultListViewItemStyle}">
<Style BasedOn="{StaticResource DefaultListViewItemStyle}"
TargetType="ListViewItem">
<Setter Property="HorizontalContentAlignment" Value="Left" />
</Style>
</ListView.ItemContainerStyle>
Expand Down

0 comments on commit 186133a

Please sign in to comment.