Skip to content

Commit d3c108b

Browse files
committed
code improvements
1 parent ef664e3 commit d3c108b

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

src/TableView.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1097,7 +1097,7 @@ private void OnCellSelectionChanged()
10971097
DispatcherQueue.TryEnqueue(() =>
10981098
{
10991099
var oldSelection = SelectedCells;
1100-
SelectedCells = new HashSet<TableViewCellSlot>(SelectedCellRanges.SelectMany(x => x));
1100+
SelectedCells = [.. SelectedCellRanges.SelectMany(x => x)];
11011101

11021102
var rowIndexes = oldSelection.Select(x => x.Row).Concat(SelectedCells.Select(x => x.Row)).Distinct();
11031103

src/Themes/TableViewColumnHeader.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<Setter Property="VerticalContentAlignment"
3232
Value="Center" />
3333
<Setter Property="HorizontalContentAlignment"
34-
Value="Left" />
34+
Value="Stretch" />
3535
<Setter Property="IsTabStop"
3636
Value="False" />
3737
<Setter Property="Background">

src/WinUI.TableView.csproj

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,20 @@
1616
<DisableImplicitUnoPackages>true</DisableImplicitUnoPackages>
1717
</PropertyGroup>
1818

19+
<PropertyGroup Condition="'$([MSBuild]::GetTargetPlatformIdentifier($(TargetFramework)))' == 'windows'">
20+
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
21+
</PropertyGroup>
22+
1923
<ItemGroup>
2024
<PackageReference Include="CommunityToolkit.WinUI.Behaviors" Version="8.1.240916" />
21-
<PackageReference Condition="'$(TargetFramework)' == 'net8.0-windows10.0.22621.0'" Include="Microsoft.WindowsAppSDK" Version="1.6.250108002" />
22-
<PackageReference Condition="'$(TargetFramework)' != 'net8.0-windows10.0.22621.0'" Include="Uno.WinUI" Version="5.5.95" />
25+
</ItemGroup>
26+
27+
<ItemGroup Condition="'$([MSBuild]::GetTargetPlatformIdentifier($(TargetFramework)))' != 'windows'">
28+
<PackageReference Include="Uno.WinUI" Version="5.5.95" />
29+
</ItemGroup>
30+
31+
<ItemGroup Condition="'$([MSBuild]::GetTargetPlatformIdentifier($(TargetFramework)))' == 'windows'">
32+
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.6.250108002" />
2333
</ItemGroup>
2434

2535
<PropertyGroup Condition="'$(Configuration)' == 'Release'">

0 commit comments

Comments
 (0)