From 9918cff2a1532448e39bcfd2f4ed80f73727a268 Mon Sep 17 00:00:00 2001 From: Edward Miller Date: Tue, 3 Dec 2024 18:56:24 -0600 Subject: [PATCH 1/4] add .gitattributes --- .gitattributes | 63 ++++++++++++++++++++++++++++++++++++++++ .gitignore | 1 - Maui.DataGrid.Sample.sln | 1 + 3 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..1ff0c42 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,63 @@ +############################################################################### +# Set default behavior to automatically normalize line endings. +############################################################################### +* text=auto + +############################################################################### +# Set default behavior for command prompt diff. +# +# This is need for earlier builds of msysgit that does not have it on by +# default for csharp files. +# Note: This is only used by command line +############################################################################### +#*.cs diff=csharp + +############################################################################### +# Set the merge driver for project and solution files +# +# Merging from the command prompt will add diff markers to the files if there +# are conflicts (Merging from VS is not affected by the settings below, in VS +# the diff markers are never inserted). Diff markers may cause the following +# file extensions to fail to load in VS. An alternative would be to treat +# these files as binary and thus will always conflict and require user +# intervention with every merge. To do so, just uncomment the entries below +############################################################################### +#*.sln merge=binary +#*.csproj merge=binary +#*.vbproj merge=binary +#*.vcxproj merge=binary +#*.vcproj merge=binary +#*.dbproj merge=binary +#*.fsproj merge=binary +#*.lsproj merge=binary +#*.wixproj merge=binary +#*.modelproj merge=binary +#*.sqlproj merge=binary +#*.wwaproj merge=binary + +############################################################################### +# behavior for image files +# +# image files are treated as binary by default. +############################################################################### +#*.jpg binary +#*.png binary +#*.gif binary + +############################################################################### +# diff behavior for common document formats +# +# Convert binary document formats to text before diffing them. This feature +# is only available from the command line. Turn it on by uncommenting the +# entries below. +############################################################################### +#*.doc diff=astextplain +#*.DOC diff=astextplain +#*.docx diff=astextplain +#*.DOCX diff=astextplain +#*.dot diff=astextplain +#*.DOT diff=astextplain +#*.pdf diff=astextplain +#*.PDF diff=astextplain +#*.rtf diff=astextplain +#*.RTF diff=astextplain diff --git a/.gitignore b/.gitignore index 59c0bdc..eaa9902 100644 --- a/.gitignore +++ b/.gitignore @@ -361,4 +361,3 @@ MigrationBackup/ # Fody - auto-generated XML schema FodyWeavers.xsd -.gitattributes diff --git a/Maui.DataGrid.Sample.sln b/Maui.DataGrid.Sample.sln index 3c10d38..b4870fe 100644 --- a/Maui.DataGrid.Sample.sln +++ b/Maui.DataGrid.Sample.sln @@ -10,6 +10,7 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Root Files", "Root Files", "{175C8F2C-B5A2-4AAE-A858-2D4A1E8F073E}" ProjectSection(SolutionItems) = preProject .editorconfig = .editorconfig + .gitattributes = .gitattributes .gitignore = .gitignore Directory.Build.props = Directory.Build.props LICENSE = LICENSE From 0bfdccfd3bcb8eecf44afc5a0a0a0cd12b53543e Mon Sep 17 00:00:00 2001 From: Edward Miller Date: Tue, 3 Dec 2024 18:57:25 -0600 Subject: [PATCH 2/4] conditionally set MauiVersion --- Directory.Build.props | 9 +- Maui.DataGrid.Sample/packages.lock.json | 270 ++++++++++++------------ Maui.DataGrid/DataGridCell.cs | 5 + Maui.DataGrid/DataGridColumn.cs | 4 + Maui.DataGrid/DataGridHeaderRow.cs | 6 +- Maui.DataGrid/DataGridRow.cs | 6 +- Maui.DataGrid/packages.lock.json | 236 +++++++++------------ 7 files changed, 262 insertions(+), 274 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 8958e1b..7bda925 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -18,7 +18,6 @@ $(NoWarn);CA2007;CS1591;NU1605;SA1101;SA1124;SA1309;SA1600;SA1633 Debug;Release;Test - 9.0.10 true @@ -27,6 +26,14 @@ true + + 8.0.100 + + + + 9.0.12 + + stylecop.json diff --git a/Maui.DataGrid.Sample/packages.lock.json b/Maui.DataGrid.Sample/packages.lock.json index c8fc1b4..5a9405d 100644 --- a/Maui.DataGrid.Sample/packages.lock.json +++ b/Maui.DataGrid.Sample/packages.lock.json @@ -20,14 +20,14 @@ }, "Microsoft.Maui.Controls": { "type": "Direct", - "requested": "[9.0.10, )", - "resolved": "9.0.10", - "contentHash": "3P2OU0vcTZqVXz4u2Pvux6P6IB/dvY9tBGBzYVYG/+GPa06nN1naNkGuOed4rdlspKqmj9TmFp4O0d6GIX0ieA==", + "requested": "[9.0.12, )", + "resolved": "9.0.12", + "contentHash": "8vJjqLWTvdvOZvHtFUByP9CqYI854zWp7NVFIAD7lJ93Ohd1gYSKBiwDFF9bz938DEGjubymK1/6cNXzFsVK8A==", "dependencies": { - "Microsoft.Maui.Controls.Build.Tasks": "9.0.10", - "Microsoft.Maui.Controls.Core": "9.0.10", - "Microsoft.Maui.Controls.Xaml": "9.0.10", - "Microsoft.Maui.Resizetizer": "9.0.10" + "Microsoft.Maui.Controls.Build.Tasks": "9.0.12", + "Microsoft.Maui.Controls.Core": "9.0.12", + "Microsoft.Maui.Controls.Xaml": "9.0.12", + "Microsoft.Maui.Resizetizer": "9.0.12" } }, "Microsoft.NET.ILLink.Tasks": { @@ -147,46 +147,46 @@ }, "Microsoft.Maui.Controls.Build.Tasks": { "type": "Transitive", - "resolved": "9.0.10", - "contentHash": "EQpfTIjNuY/pfTG4+TbyEJAW63SoU0GuwdjY1E2sZIJdTxNFTD36nClmZJpVNWf4ySol8rPu2kfOznbDNhv35Q==", + "resolved": "9.0.12", + "contentHash": "oaTP6enzFIVDPFTwkLY0g1O8lDawTPijClRcq5OT4B8sgiRWtQt6el5cTW7dSncyV4aePD+Ka+Z0rvhwmOxAsA==", "dependencies": { - "Microsoft.Maui.Controls.Core": "9.0.10", - "Microsoft.Maui.Controls.Xaml": "9.0.10" + "Microsoft.Maui.Controls.Core": "9.0.12", + "Microsoft.Maui.Controls.Xaml": "9.0.12" } }, "Microsoft.Maui.Controls.Core": { "type": "Transitive", - "resolved": "9.0.10", - "contentHash": "YBliIXb3Z0bAWjrldkIV9ku2o+ciejaypvQQyzebvA16A0wNmIYJY7uGdygVwSmpcPL73ZwwMCBPD4IqD1ogrg==", + "resolved": "9.0.12", + "contentHash": "ly27EAtymY1Cn8a0dHAG1RpffrBTQnJU7swJHQgU/NNb0U7+8nUKBmqhvlWuXfQfPr1ZEN1EGL38eDt6Nx3Ghg==", "dependencies": { "Microsoft.Extensions.Configuration": "9.0.0", "Microsoft.Extensions.DependencyInjection": "9.0.0", "Microsoft.Extensions.Logging": "9.0.0", "Microsoft.Extensions.Logging.Abstractions": "9.0.0", - "Microsoft.Maui.Core": "9.0.10" + "Microsoft.Maui.Core": "9.0.12" } }, "Microsoft.Maui.Controls.Xaml": { "type": "Transitive", - "resolved": "9.0.10", - "contentHash": "5cgWqRdTAtzps/Qz2RB4XZ1x5usVHeSjFVHE8LV2WG1avEztSteGQGmvgDYjnJrGPnCNcp4S7Ivh6mxDJwHDQQ==", + "resolved": "9.0.12", + "contentHash": "pBwDMimjxmtZiL6ukE7to+xNEH53VHxlrc1oFpDtK/scKZ7AWAGV09/ZTAPc5dv/Ii3B1Cysx0vWQ1CPUpr61A==", "dependencies": { "Microsoft.Extensions.Configuration": "9.0.0", - "Microsoft.Maui.Controls.Core": "9.0.10", - "Microsoft.Maui.Core": "9.0.10" + "Microsoft.Maui.Controls.Core": "9.0.12", + "Microsoft.Maui.Core": "9.0.12" } }, "Microsoft.Maui.Core": { "type": "Transitive", - "resolved": "9.0.10", - "contentHash": "7hrCvNUiF5hPLB+IDcFJ9ncD1ciPNJkUO1NxFMoeDKEttZqt/j8+za/XaGxRgzZWF1QaIXaee+WI8jwx4/G5+g==", + "resolved": "9.0.12", + "contentHash": "hI6wlNM2AYT3z0MFHhtEEmMGv4BaVWg/Pa9kLKJVCqnfyViPDBbMER9gAe7UTFVx4THLMHqXVqRw+8XhLSZpCg==", "dependencies": { "Microsoft.Extensions.Configuration": "9.0.0", "Microsoft.Extensions.DependencyInjection": "9.0.0", "Microsoft.Extensions.Logging": "9.0.0", "Microsoft.Extensions.Logging.Abstractions": "9.0.0", - "Microsoft.Maui.Essentials": "9.0.10", - "Microsoft.Maui.Graphics": "9.0.10", + "Microsoft.Maui.Essentials": "9.0.12", + "Microsoft.Maui.Graphics": "9.0.12", "Xamarin.Android.Glide": "4.16.0.6", "Xamarin.AndroidX.Lifecycle.LiveData": "2.8.5.1", "Xamarin.AndroidX.Navigation.Common": "2.8.0.1", @@ -199,10 +199,10 @@ }, "Microsoft.Maui.Essentials": { "type": "Transitive", - "resolved": "9.0.10", - "contentHash": "F7bpJf7YP8Yxc3+oF9JzVZzEGuw3Pn30ULYomIyFKaUJvw0ceKGhv/QnXrKpwfAY/xAXTN7p0MVsRrEf5BsS1A==", + "resolved": "9.0.12", + "contentHash": "qKjJ5c3vuh9gO0AG+CQ0EmIlKyt9bWo8nbcj5V58p7V4kBP7/i1mVMbZUuujC0pLRYpE1iAbuSrrklUrAzM4uQ==", "dependencies": { - "Microsoft.Maui.Graphics": "9.0.10", + "Microsoft.Maui.Graphics": "9.0.12", "Xamarin.AndroidX.Browser": "1.8.0.6", "Xamarin.AndroidX.Security.SecurityCrypto": "1.1.0.2-alpha06", "Xamarin.Google.Crypto.Tink.Android": "1.15.0.1" @@ -210,13 +210,13 @@ }, "Microsoft.Maui.Graphics": { "type": "Transitive", - "resolved": "9.0.10", - "contentHash": "QeM0B5H7OTqgY42sryVObbtvi55rWJPqFbBUZ6l344eaz07KsdUKon6WrcyJsuybVcLQcPV5HpLevFfk+lV0Yw==" + "resolved": "9.0.12", + "contentHash": "Uue3f23FDUT5hyDxbTzSyj3c+Td/PaXtwUhi2xnQni7FFLgnrojWbxQ7+BGyXYoYsUj2VZ3VAbUIBiUhRBkbhA==" }, "Microsoft.Maui.Resizetizer": { "type": "Transitive", - "resolved": "9.0.10", - "contentHash": "cQLA4jeFF8mAVmqK6eJLSN374WK9+plVXpzxyVYd3Kes4d+JHRmjGrCrBDEkWlOXmH6jpAcGLlMa2utuuJDwOA==" + "resolved": "9.0.12", + "contentHash": "8X7cuptKpqMD8DB1FwKBqclyutjf5L4+7H5yZY6MyiBeUeFKMGIpJEpu2f4t3vwTwGhc/zKkjzFJj2ZW8+sf2g==" }, "Microsoft.NETCore.Platforms": { "type": "Transitive", @@ -1573,7 +1573,7 @@ "contentHash": "4HEfsQIKAhA1+ApNn729Gi09zh+lYWwyIuViihoMDWp1vQnEkL2ct7mAbhBlLYm+x/L4Rr/pyGge1lIY635e0w==" } }, - "net9.0-android35.0/ios-arm64": { + "net9.0-android35.0/iossimulator-x64": { "System.IO.Compression": { "type": "Transitive", "resolved": "4.1.0", @@ -1669,7 +1669,7 @@ "contentHash": "4HEfsQIKAhA1+ApNn729Gi09zh+lYWwyIuViihoMDWp1vQnEkL2ct7mAbhBlLYm+x/L4Rr/pyGge1lIY635e0w==" } }, - "net9.0-ios18.0": { + "net9.0-ios18.1": { "CommunityToolkit.Maui": { "type": "Direct", "requested": "[9.1.1, )", @@ -1688,14 +1688,14 @@ }, "Microsoft.Maui.Controls": { "type": "Direct", - "requested": "[9.0.10, )", - "resolved": "9.0.10", - "contentHash": "3P2OU0vcTZqVXz4u2Pvux6P6IB/dvY9tBGBzYVYG/+GPa06nN1naNkGuOed4rdlspKqmj9TmFp4O0d6GIX0ieA==", + "requested": "[9.0.12, )", + "resolved": "9.0.12", + "contentHash": "8vJjqLWTvdvOZvHtFUByP9CqYI854zWp7NVFIAD7lJ93Ohd1gYSKBiwDFF9bz938DEGjubymK1/6cNXzFsVK8A==", "dependencies": { - "Microsoft.Maui.Controls.Build.Tasks": "9.0.10", - "Microsoft.Maui.Controls.Core": "9.0.10", - "Microsoft.Maui.Controls.Xaml": "9.0.10", - "Microsoft.Maui.Resizetizer": "9.0.10" + "Microsoft.Maui.Controls.Build.Tasks": "9.0.12", + "Microsoft.Maui.Controls.Core": "9.0.12", + "Microsoft.Maui.Controls.Xaml": "9.0.12", + "Microsoft.Maui.Resizetizer": "9.0.12" } }, "Microsoft.NET.ILLink.Tasks": { @@ -1808,65 +1808,65 @@ }, "Microsoft.Maui.Controls.Build.Tasks": { "type": "Transitive", - "resolved": "9.0.10", - "contentHash": "EQpfTIjNuY/pfTG4+TbyEJAW63SoU0GuwdjY1E2sZIJdTxNFTD36nClmZJpVNWf4ySol8rPu2kfOznbDNhv35Q==", + "resolved": "9.0.12", + "contentHash": "oaTP6enzFIVDPFTwkLY0g1O8lDawTPijClRcq5OT4B8sgiRWtQt6el5cTW7dSncyV4aePD+Ka+Z0rvhwmOxAsA==", "dependencies": { - "Microsoft.Maui.Controls.Core": "9.0.10", - "Microsoft.Maui.Controls.Xaml": "9.0.10" + "Microsoft.Maui.Controls.Core": "9.0.12", + "Microsoft.Maui.Controls.Xaml": "9.0.12" } }, "Microsoft.Maui.Controls.Core": { "type": "Transitive", - "resolved": "9.0.10", - "contentHash": "YBliIXb3Z0bAWjrldkIV9ku2o+ciejaypvQQyzebvA16A0wNmIYJY7uGdygVwSmpcPL73ZwwMCBPD4IqD1ogrg==", + "resolved": "9.0.12", + "contentHash": "ly27EAtymY1Cn8a0dHAG1RpffrBTQnJU7swJHQgU/NNb0U7+8nUKBmqhvlWuXfQfPr1ZEN1EGL38eDt6Nx3Ghg==", "dependencies": { "Microsoft.Extensions.Configuration": "9.0.0", "Microsoft.Extensions.DependencyInjection": "9.0.0", "Microsoft.Extensions.Logging": "9.0.0", "Microsoft.Extensions.Logging.Abstractions": "9.0.0", - "Microsoft.Maui.Core": "9.0.10" + "Microsoft.Maui.Core": "9.0.12" } }, "Microsoft.Maui.Controls.Xaml": { "type": "Transitive", - "resolved": "9.0.10", - "contentHash": "5cgWqRdTAtzps/Qz2RB4XZ1x5usVHeSjFVHE8LV2WG1avEztSteGQGmvgDYjnJrGPnCNcp4S7Ivh6mxDJwHDQQ==", + "resolved": "9.0.12", + "contentHash": "pBwDMimjxmtZiL6ukE7to+xNEH53VHxlrc1oFpDtK/scKZ7AWAGV09/ZTAPc5dv/Ii3B1Cysx0vWQ1CPUpr61A==", "dependencies": { "Microsoft.Extensions.Configuration": "9.0.0", - "Microsoft.Maui.Controls.Core": "9.0.10", - "Microsoft.Maui.Core": "9.0.10" + "Microsoft.Maui.Controls.Core": "9.0.12", + "Microsoft.Maui.Core": "9.0.12" } }, "Microsoft.Maui.Core": { "type": "Transitive", - "resolved": "9.0.10", - "contentHash": "7hrCvNUiF5hPLB+IDcFJ9ncD1ciPNJkUO1NxFMoeDKEttZqt/j8+za/XaGxRgzZWF1QaIXaee+WI8jwx4/G5+g==", + "resolved": "9.0.12", + "contentHash": "hI6wlNM2AYT3z0MFHhtEEmMGv4BaVWg/Pa9kLKJVCqnfyViPDBbMER9gAe7UTFVx4THLMHqXVqRw+8XhLSZpCg==", "dependencies": { "Microsoft.Extensions.Configuration": "9.0.0", "Microsoft.Extensions.DependencyInjection": "9.0.0", "Microsoft.Extensions.Logging": "9.0.0", "Microsoft.Extensions.Logging.Abstractions": "9.0.0", - "Microsoft.Maui.Essentials": "9.0.10", - "Microsoft.Maui.Graphics": "9.0.10" + "Microsoft.Maui.Essentials": "9.0.12", + "Microsoft.Maui.Graphics": "9.0.12" } }, "Microsoft.Maui.Essentials": { "type": "Transitive", - "resolved": "9.0.10", - "contentHash": "F7bpJf7YP8Yxc3+oF9JzVZzEGuw3Pn30ULYomIyFKaUJvw0ceKGhv/QnXrKpwfAY/xAXTN7p0MVsRrEf5BsS1A==", + "resolved": "9.0.12", + "contentHash": "qKjJ5c3vuh9gO0AG+CQ0EmIlKyt9bWo8nbcj5V58p7V4kBP7/i1mVMbZUuujC0pLRYpE1iAbuSrrklUrAzM4uQ==", "dependencies": { - "Microsoft.Maui.Graphics": "9.0.10" + "Microsoft.Maui.Graphics": "9.0.12" } }, "Microsoft.Maui.Graphics": { "type": "Transitive", - "resolved": "9.0.10", - "contentHash": "QeM0B5H7OTqgY42sryVObbtvi55rWJPqFbBUZ6l344eaz07KsdUKon6WrcyJsuybVcLQcPV5HpLevFfk+lV0Yw==" + "resolved": "9.0.12", + "contentHash": "Uue3f23FDUT5hyDxbTzSyj3c+Td/PaXtwUhi2xnQni7FFLgnrojWbxQ7+BGyXYoYsUj2VZ3VAbUIBiUhRBkbhA==" }, "Microsoft.Maui.Resizetizer": { "type": "Transitive", - "resolved": "9.0.10", - "contentHash": "cQLA4jeFF8mAVmqK6eJLSN374WK9+plVXpzxyVYd3Kes4d+JHRmjGrCrBDEkWlOXmH6jpAcGLlMa2utuuJDwOA==" + "resolved": "9.0.12", + "contentHash": "8X7cuptKpqMD8DB1FwKBqclyutjf5L4+7H5yZY6MyiBeUeFKMGIpJEpu2f4t3vwTwGhc/zKkjzFJj2ZW8+sf2g==" }, "Microsoft.NETCore.Platforms": { "type": "Transitive", @@ -2772,7 +2772,7 @@ "type": "Project" } }, - "net9.0-ios18.0/android-arm64": { + "net9.0-ios18.1/android-arm64": { "Microsoft.Win32.Primitives": { "type": "Transitive", "resolved": "4.0.1", @@ -3563,7 +3563,7 @@ } } }, - "net9.0-ios18.0/android-x64": { + "net9.0-ios18.1/android-x64": { "Microsoft.Win32.Primitives": { "type": "Transitive", "resolved": "4.0.1", @@ -4354,7 +4354,7 @@ } } }, - "net9.0-ios18.0/ios-arm64": { + "net9.0-ios18.1/iossimulator-x64": { "Microsoft.Win32.Primitives": { "type": "Transitive", "resolved": "4.0.1", @@ -5145,7 +5145,7 @@ } } }, - "net9.0-ios18.0/maccatalyst-x64": { + "net9.0-ios18.1/maccatalyst-x64": { "Microsoft.Win32.Primitives": { "type": "Transitive", "resolved": "4.0.1", @@ -5936,7 +5936,7 @@ } } }, - "net9.0-ios18.0/win10-x64": { + "net9.0-ios18.1/win10-x64": { "Microsoft.Win32.Primitives": { "type": "Transitive", "resolved": "4.0.1", @@ -6730,7 +6730,7 @@ } } }, - "net9.0-maccatalyst18.0": { + "net9.0-maccatalyst18.1": { "CommunityToolkit.Maui": { "type": "Direct", "requested": "[9.1.1, )", @@ -6749,14 +6749,14 @@ }, "Microsoft.Maui.Controls": { "type": "Direct", - "requested": "[9.0.10, )", - "resolved": "9.0.10", - "contentHash": "3P2OU0vcTZqVXz4u2Pvux6P6IB/dvY9tBGBzYVYG/+GPa06nN1naNkGuOed4rdlspKqmj9TmFp4O0d6GIX0ieA==", + "requested": "[9.0.12, )", + "resolved": "9.0.12", + "contentHash": "8vJjqLWTvdvOZvHtFUByP9CqYI854zWp7NVFIAD7lJ93Ohd1gYSKBiwDFF9bz938DEGjubymK1/6cNXzFsVK8A==", "dependencies": { - "Microsoft.Maui.Controls.Build.Tasks": "9.0.10", - "Microsoft.Maui.Controls.Core": "9.0.10", - "Microsoft.Maui.Controls.Xaml": "9.0.10", - "Microsoft.Maui.Resizetizer": "9.0.10" + "Microsoft.Maui.Controls.Build.Tasks": "9.0.12", + "Microsoft.Maui.Controls.Core": "9.0.12", + "Microsoft.Maui.Controls.Xaml": "9.0.12", + "Microsoft.Maui.Resizetizer": "9.0.12" } }, "Microsoft.NET.ILLink.Tasks": { @@ -6869,65 +6869,65 @@ }, "Microsoft.Maui.Controls.Build.Tasks": { "type": "Transitive", - "resolved": "9.0.10", - "contentHash": "EQpfTIjNuY/pfTG4+TbyEJAW63SoU0GuwdjY1E2sZIJdTxNFTD36nClmZJpVNWf4ySol8rPu2kfOznbDNhv35Q==", + "resolved": "9.0.12", + "contentHash": "oaTP6enzFIVDPFTwkLY0g1O8lDawTPijClRcq5OT4B8sgiRWtQt6el5cTW7dSncyV4aePD+Ka+Z0rvhwmOxAsA==", "dependencies": { - "Microsoft.Maui.Controls.Core": "9.0.10", - "Microsoft.Maui.Controls.Xaml": "9.0.10" + "Microsoft.Maui.Controls.Core": "9.0.12", + "Microsoft.Maui.Controls.Xaml": "9.0.12" } }, "Microsoft.Maui.Controls.Core": { "type": "Transitive", - "resolved": "9.0.10", - "contentHash": "YBliIXb3Z0bAWjrldkIV9ku2o+ciejaypvQQyzebvA16A0wNmIYJY7uGdygVwSmpcPL73ZwwMCBPD4IqD1ogrg==", + "resolved": "9.0.12", + "contentHash": "ly27EAtymY1Cn8a0dHAG1RpffrBTQnJU7swJHQgU/NNb0U7+8nUKBmqhvlWuXfQfPr1ZEN1EGL38eDt6Nx3Ghg==", "dependencies": { "Microsoft.Extensions.Configuration": "9.0.0", "Microsoft.Extensions.DependencyInjection": "9.0.0", "Microsoft.Extensions.Logging": "9.0.0", "Microsoft.Extensions.Logging.Abstractions": "9.0.0", - "Microsoft.Maui.Core": "9.0.10" + "Microsoft.Maui.Core": "9.0.12" } }, "Microsoft.Maui.Controls.Xaml": { "type": "Transitive", - "resolved": "9.0.10", - "contentHash": "5cgWqRdTAtzps/Qz2RB4XZ1x5usVHeSjFVHE8LV2WG1avEztSteGQGmvgDYjnJrGPnCNcp4S7Ivh6mxDJwHDQQ==", + "resolved": "9.0.12", + "contentHash": "pBwDMimjxmtZiL6ukE7to+xNEH53VHxlrc1oFpDtK/scKZ7AWAGV09/ZTAPc5dv/Ii3B1Cysx0vWQ1CPUpr61A==", "dependencies": { "Microsoft.Extensions.Configuration": "9.0.0", - "Microsoft.Maui.Controls.Core": "9.0.10", - "Microsoft.Maui.Core": "9.0.10" + "Microsoft.Maui.Controls.Core": "9.0.12", + "Microsoft.Maui.Core": "9.0.12" } }, "Microsoft.Maui.Core": { "type": "Transitive", - "resolved": "9.0.10", - "contentHash": "7hrCvNUiF5hPLB+IDcFJ9ncD1ciPNJkUO1NxFMoeDKEttZqt/j8+za/XaGxRgzZWF1QaIXaee+WI8jwx4/G5+g==", + "resolved": "9.0.12", + "contentHash": "hI6wlNM2AYT3z0MFHhtEEmMGv4BaVWg/Pa9kLKJVCqnfyViPDBbMER9gAe7UTFVx4THLMHqXVqRw+8XhLSZpCg==", "dependencies": { "Microsoft.Extensions.Configuration": "9.0.0", "Microsoft.Extensions.DependencyInjection": "9.0.0", "Microsoft.Extensions.Logging": "9.0.0", "Microsoft.Extensions.Logging.Abstractions": "9.0.0", - "Microsoft.Maui.Essentials": "9.0.10", - "Microsoft.Maui.Graphics": "9.0.10" + "Microsoft.Maui.Essentials": "9.0.12", + "Microsoft.Maui.Graphics": "9.0.12" } }, "Microsoft.Maui.Essentials": { "type": "Transitive", - "resolved": "9.0.10", - "contentHash": "F7bpJf7YP8Yxc3+oF9JzVZzEGuw3Pn30ULYomIyFKaUJvw0ceKGhv/QnXrKpwfAY/xAXTN7p0MVsRrEf5BsS1A==", + "resolved": "9.0.12", + "contentHash": "qKjJ5c3vuh9gO0AG+CQ0EmIlKyt9bWo8nbcj5V58p7V4kBP7/i1mVMbZUuujC0pLRYpE1iAbuSrrklUrAzM4uQ==", "dependencies": { - "Microsoft.Maui.Graphics": "9.0.10" + "Microsoft.Maui.Graphics": "9.0.12" } }, "Microsoft.Maui.Graphics": { "type": "Transitive", - "resolved": "9.0.10", - "contentHash": "QeM0B5H7OTqgY42sryVObbtvi55rWJPqFbBUZ6l344eaz07KsdUKon6WrcyJsuybVcLQcPV5HpLevFfk+lV0Yw==" + "resolved": "9.0.12", + "contentHash": "Uue3f23FDUT5hyDxbTzSyj3c+Td/PaXtwUhi2xnQni7FFLgnrojWbxQ7+BGyXYoYsUj2VZ3VAbUIBiUhRBkbhA==" }, "Microsoft.Maui.Resizetizer": { "type": "Transitive", - "resolved": "9.0.10", - "contentHash": "cQLA4jeFF8mAVmqK6eJLSN374WK9+plVXpzxyVYd3Kes4d+JHRmjGrCrBDEkWlOXmH6jpAcGLlMa2utuuJDwOA==" + "resolved": "9.0.12", + "contentHash": "8X7cuptKpqMD8DB1FwKBqclyutjf5L4+7H5yZY6MyiBeUeFKMGIpJEpu2f4t3vwTwGhc/zKkjzFJj2ZW8+sf2g==" }, "Microsoft.NETCore.Platforms": { "type": "Transitive", @@ -7833,7 +7833,7 @@ "type": "Project" } }, - "net9.0-maccatalyst18.0/android-arm64": { + "net9.0-maccatalyst18.1/android-arm64": { "Microsoft.Win32.Primitives": { "type": "Transitive", "resolved": "4.0.1", @@ -8624,7 +8624,7 @@ } } }, - "net9.0-maccatalyst18.0/android-x64": { + "net9.0-maccatalyst18.1/android-x64": { "Microsoft.Win32.Primitives": { "type": "Transitive", "resolved": "4.0.1", @@ -9415,7 +9415,7 @@ } } }, - "net9.0-maccatalyst18.0/ios-arm64": { + "net9.0-maccatalyst18.1/iossimulator-x64": { "Microsoft.Win32.Primitives": { "type": "Transitive", "resolved": "4.0.1", @@ -10206,7 +10206,7 @@ } } }, - "net9.0-maccatalyst18.0/maccatalyst-x64": { + "net9.0-maccatalyst18.1/maccatalyst-x64": { "Microsoft.Win32.Primitives": { "type": "Transitive", "resolved": "4.0.1", @@ -10997,7 +10997,7 @@ } } }, - "net9.0-maccatalyst18.0/win10-x64": { + "net9.0-maccatalyst18.1/win10-x64": { "Microsoft.Win32.Primitives": { "type": "Transitive", "resolved": "4.0.1", @@ -11810,14 +11810,14 @@ }, "Microsoft.Maui.Controls": { "type": "Direct", - "requested": "[9.0.10, )", - "resolved": "9.0.10", - "contentHash": "3P2OU0vcTZqVXz4u2Pvux6P6IB/dvY9tBGBzYVYG/+GPa06nN1naNkGuOed4rdlspKqmj9TmFp4O0d6GIX0ieA==", + "requested": "[9.0.12, )", + "resolved": "9.0.12", + "contentHash": "8vJjqLWTvdvOZvHtFUByP9CqYI854zWp7NVFIAD7lJ93Ohd1gYSKBiwDFF9bz938DEGjubymK1/6cNXzFsVK8A==", "dependencies": { - "Microsoft.Maui.Controls.Build.Tasks": "9.0.10", - "Microsoft.Maui.Controls.Core": "9.0.10", - "Microsoft.Maui.Controls.Xaml": "9.0.10", - "Microsoft.Maui.Resizetizer": "9.0.10" + "Microsoft.Maui.Controls.Build.Tasks": "9.0.12", + "Microsoft.Maui.Controls.Core": "9.0.12", + "Microsoft.Maui.Controls.Xaml": "9.0.12", + "Microsoft.Maui.Resizetizer": "9.0.12" } }, "Shiny.Xunit.Runners.Maui": { @@ -11937,48 +11937,48 @@ }, "Microsoft.Maui.Controls.Build.Tasks": { "type": "Transitive", - "resolved": "9.0.10", - "contentHash": "EQpfTIjNuY/pfTG4+TbyEJAW63SoU0GuwdjY1E2sZIJdTxNFTD36nClmZJpVNWf4ySol8rPu2kfOznbDNhv35Q==", + "resolved": "9.0.12", + "contentHash": "oaTP6enzFIVDPFTwkLY0g1O8lDawTPijClRcq5OT4B8sgiRWtQt6el5cTW7dSncyV4aePD+Ka+Z0rvhwmOxAsA==", "dependencies": { - "Microsoft.Maui.Controls.Core": "9.0.10", - "Microsoft.Maui.Controls.Xaml": "9.0.10" + "Microsoft.Maui.Controls.Core": "9.0.12", + "Microsoft.Maui.Controls.Xaml": "9.0.12" } }, "Microsoft.Maui.Controls.Core": { "type": "Transitive", - "resolved": "9.0.10", - "contentHash": "YBliIXb3Z0bAWjrldkIV9ku2o+ciejaypvQQyzebvA16A0wNmIYJY7uGdygVwSmpcPL73ZwwMCBPD4IqD1ogrg==", + "resolved": "9.0.12", + "contentHash": "ly27EAtymY1Cn8a0dHAG1RpffrBTQnJU7swJHQgU/NNb0U7+8nUKBmqhvlWuXfQfPr1ZEN1EGL38eDt6Nx3Ghg==", "dependencies": { "Microsoft.Extensions.Configuration": "9.0.0", "Microsoft.Extensions.DependencyInjection": "9.0.0", "Microsoft.Extensions.Logging": "9.0.0", "Microsoft.Extensions.Logging.Abstractions": "9.0.0", - "Microsoft.Maui.Core": "9.0.10" + "Microsoft.Maui.Core": "9.0.12" } }, "Microsoft.Maui.Controls.Xaml": { "type": "Transitive", - "resolved": "9.0.10", - "contentHash": "5cgWqRdTAtzps/Qz2RB4XZ1x5usVHeSjFVHE8LV2WG1avEztSteGQGmvgDYjnJrGPnCNcp4S7Ivh6mxDJwHDQQ==", + "resolved": "9.0.12", + "contentHash": "pBwDMimjxmtZiL6ukE7to+xNEH53VHxlrc1oFpDtK/scKZ7AWAGV09/ZTAPc5dv/Ii3B1Cysx0vWQ1CPUpr61A==", "dependencies": { "Microsoft.Extensions.Configuration": "9.0.0", - "Microsoft.Maui.Controls.Core": "9.0.10", - "Microsoft.Maui.Core": "9.0.10" + "Microsoft.Maui.Controls.Core": "9.0.12", + "Microsoft.Maui.Core": "9.0.12" } }, "Microsoft.Maui.Core": { "type": "Transitive", - "resolved": "9.0.10", - "contentHash": "7hrCvNUiF5hPLB+IDcFJ9ncD1ciPNJkUO1NxFMoeDKEttZqt/j8+za/XaGxRgzZWF1QaIXaee+WI8jwx4/G5+g==", + "resolved": "9.0.12", + "contentHash": "hI6wlNM2AYT3z0MFHhtEEmMGv4BaVWg/Pa9kLKJVCqnfyViPDBbMER9gAe7UTFVx4THLMHqXVqRw+8XhLSZpCg==", "dependencies": { "Microsoft.Extensions.Configuration": "9.0.0", "Microsoft.Extensions.DependencyInjection": "9.0.0", "Microsoft.Extensions.Logging": "9.0.0", "Microsoft.Extensions.Logging.Abstractions": "9.0.0", "Microsoft.Graphics.Win2D": "1.2.0", - "Microsoft.Maui.Essentials": "9.0.10", - "Microsoft.Maui.Graphics": "9.0.10", - "Microsoft.Maui.Graphics.Win2D.WinUI.Desktop": "9.0.10", + "Microsoft.Maui.Essentials": "9.0.12", + "Microsoft.Maui.Graphics": "9.0.12", + "Microsoft.Maui.Graphics.Win2D.WinUI.Desktop": "9.0.12", "Microsoft.Web.WebView2": "1.0.2792.45", "Microsoft.Windows.SDK.BuildTools": "10.0.22621.756", "Microsoft.WindowsAppSDK": "1.6.240923002" @@ -11986,16 +11986,16 @@ }, "Microsoft.Maui.Essentials": { "type": "Transitive", - "resolved": "9.0.10", - "contentHash": "F7bpJf7YP8Yxc3+oF9JzVZzEGuw3Pn30ULYomIyFKaUJvw0ceKGhv/QnXrKpwfAY/xAXTN7p0MVsRrEf5BsS1A==", + "resolved": "9.0.12", + "contentHash": "qKjJ5c3vuh9gO0AG+CQ0EmIlKyt9bWo8nbcj5V58p7V4kBP7/i1mVMbZUuujC0pLRYpE1iAbuSrrklUrAzM4uQ==", "dependencies": { - "Microsoft.Maui.Graphics": "9.0.10" + "Microsoft.Maui.Graphics": "9.0.12" } }, "Microsoft.Maui.Graphics": { "type": "Transitive", - "resolved": "9.0.10", - "contentHash": "QeM0B5H7OTqgY42sryVObbtvi55rWJPqFbBUZ6l344eaz07KsdUKon6WrcyJsuybVcLQcPV5HpLevFfk+lV0Yw==", + "resolved": "9.0.12", + "contentHash": "Uue3f23FDUT5hyDxbTzSyj3c+Td/PaXtwUhi2xnQni7FFLgnrojWbxQ7+BGyXYoYsUj2VZ3VAbUIBiUhRBkbhA==", "dependencies": { "Microsoft.Graphics.Win2D": "1.2.0", "Microsoft.IO.RecyclableMemoryStream": "3.0.1" @@ -12003,17 +12003,17 @@ }, "Microsoft.Maui.Graphics.Win2D.WinUI.Desktop": { "type": "Transitive", - "resolved": "9.0.10", - "contentHash": "u8afvuWnjY+vlQpk8xWVU79+++g1ONWJhC9ehMnSpr9GK827mqKqWdZZIXFFb9pRoo+KGgbZ5TNujjUO6pIPpg==", + "resolved": "9.0.12", + "contentHash": "vK4R3FwzLK1YBIAc+3eT/UrbanQ9t+EW8ALOqRwFEBVF5G3SSFU8tQa0wObTKpzfwPVodntseSj1Yn14MlJfWg==", "dependencies": { "Microsoft.Graphics.Win2D": "1.2.0", - "Microsoft.Maui.Graphics": "9.0.10" + "Microsoft.Maui.Graphics": "9.0.12" } }, "Microsoft.Maui.Resizetizer": { "type": "Transitive", - "resolved": "9.0.10", - "contentHash": "cQLA4jeFF8mAVmqK6eJLSN374WK9+plVXpzxyVYd3Kes4d+JHRmjGrCrBDEkWlOXmH6jpAcGLlMa2utuuJDwOA==" + "resolved": "9.0.12", + "contentHash": "8X7cuptKpqMD8DB1FwKBqclyutjf5L4+7H5yZY6MyiBeUeFKMGIpJEpu2f4t3vwTwGhc/zKkjzFJj2ZW8+sf2g==" }, "Microsoft.NETCore.Platforms": { "type": "Transitive", @@ -14574,7 +14574,7 @@ } } }, - "net9.0-windows10.0.26100/ios-arm64": { + "net9.0-windows10.0.26100/iossimulator-x64": { "Microsoft.Graphics.Win2D": { "type": "Transitive", "resolved": "1.2.0", @@ -17032,4 +17032,4 @@ } } } -} +} \ No newline at end of file diff --git a/Maui.DataGrid/DataGridCell.cs b/Maui.DataGrid/DataGridCell.cs index 69e2c8c..a6ed315 100644 --- a/Maui.DataGrid/DataGridCell.cs +++ b/Maui.DataGrid/DataGridCell.cs @@ -31,8 +31,13 @@ internal void UpdateBindings(DataGrid dataGrid) // And the BackgroundColor constitutes the border color of the cell. if (dataGrid.HeaderBordersVisible) { +#if NET9_0_OR_GREATER SetBinding(BackgroundColorProperty, BindingBase.Create(static x => x.BorderColor, source: dataGrid)); SetBinding(PaddingProperty, BindingBase.Create(static x => x.BorderThickness, converter: new BorderThicknessToCellPaddingConverter(), source: dataGrid)); +#else + SetBinding(BackgroundColorProperty, new Binding(nameof(DataGrid.BorderColor), source: dataGrid)); + SetBinding(PaddingProperty, new Binding(nameof(DataGrid.BorderThickness), converter: new BorderThicknessToCellPaddingConverter(), source: dataGrid)); +#endif } else { diff --git a/Maui.DataGrid/DataGridColumn.cs b/Maui.DataGrid/DataGridColumn.cs index b0144b9..f462f38 100644 --- a/Maui.DataGrid/DataGridColumn.cs +++ b/Maui.DataGrid/DataGridColumn.cs @@ -233,7 +233,11 @@ public DataGridColumn() FilterTextboxContainer = new ContentView(); +#if NET9_0_OR_GREATER FilterTextbox.SetBinding(Entry.TextProperty, BindingBase.Create(static x => x.FilterText, BindingMode.TwoWay, source: this)); +#else + FilterTextbox.SetBinding(Entry.TextProperty, new Binding(nameof(FilterText), BindingMode.TwoWay, source: this)); +#endif } #region Events diff --git a/Maui.DataGrid/DataGridHeaderRow.cs b/Maui.DataGrid/DataGridHeaderRow.cs index 6199e7d..1330cea 100644 --- a/Maui.DataGrid/DataGridHeaderRow.cs +++ b/Maui.DataGrid/DataGridHeaderRow.cs @@ -139,7 +139,11 @@ protected override void OnParentSet() column.VisibilityChanged += OnVisibilityChanged; } +#if NET9_0_OR_GREATER SetBinding(BackgroundColorProperty, BindingBase.Create(static x => x.BorderColor, source: DataGrid)); +#else + SetBinding(BackgroundColorProperty, new Binding(nameof(DataGrid.BorderColor), source: DataGrid)); +#endif } } @@ -245,5 +249,5 @@ private void SetFilterRow(DataGridColumn column) } } - #endregion Methods +#endregion Methods } diff --git a/Maui.DataGrid/DataGridRow.cs b/Maui.DataGrid/DataGridRow.cs index 292aea6..4440f9b 100644 --- a/Maui.DataGrid/DataGridRow.cs +++ b/Maui.DataGrid/DataGridRow.cs @@ -170,7 +170,11 @@ protected override void OnParentSet() column.VisibilityChanged += OnVisibilityChanged; } +#if NET9_0_OR_GREATER SetBinding(BackgroundColorProperty, BindingBase.Create(static x => x.BorderColor, source: DataGrid)); +#else + SetBinding(BackgroundColorProperty, new Binding(nameof(DataGrid.BorderColor), source: DataGrid)); +#endif } } @@ -492,5 +496,5 @@ private void UpdateSelectedState() _wasSelected = DataGrid.SelectedItem == BindingContext || DataGrid.SelectedItems.Contains(BindingContext); } - #endregion Methods +#endregion Methods } diff --git a/Maui.DataGrid/packages.lock.json b/Maui.DataGrid/packages.lock.json index 06a7be2..6c9a872 100644 --- a/Maui.DataGrid/packages.lock.json +++ b/Maui.DataGrid/packages.lock.json @@ -16,26 +16,26 @@ }, "Microsoft.Maui.Controls": { "type": "Direct", - "requested": "[9.0.10, )", - "resolved": "9.0.10", - "contentHash": "3P2OU0vcTZqVXz4u2Pvux6P6IB/dvY9tBGBzYVYG/+GPa06nN1naNkGuOed4rdlspKqmj9TmFp4O0d6GIX0ieA==", + "requested": "[8.0.100, )", + "resolved": "8.0.100", + "contentHash": "5t51qYH1m1bZX1+VLKcTqEuUBWY0NiVM6eYhQa7B0wNNzgP07Mo1ZKikdFprUm4oGgJL5lbOe2OeH+2D0afQfA==", "dependencies": { - "Microsoft.Maui.Controls.Build.Tasks": "9.0.10", - "Microsoft.Maui.Controls.Core": "9.0.10", - "Microsoft.Maui.Controls.Xaml": "9.0.10", - "Microsoft.Maui.Resizetizer": "9.0.10" + "Microsoft.Maui.Controls.Build.Tasks": "8.0.100", + "Microsoft.Maui.Controls.Core": "8.0.100", + "Microsoft.Maui.Controls.Xaml": "8.0.100", + "Microsoft.Maui.Resizetizer": "8.0.100" } }, "Microsoft.Maui.Controls.Compatibility": { "type": "Direct", - "requested": "[9.0.10, )", - "resolved": "9.0.10", - "contentHash": "WYJC+EAmRZaNQPNz3ajBXEa5Cb5i6+1QMi1uq7OQlO7UwY/hweQfgDJrBu0XlyT3wh9adelufNcUsIr2xqFXaA==", + "requested": "[8.0.100, )", + "resolved": "8.0.100", + "contentHash": "G1tJJGPX/FQKzdgSlts3lk0LACN3GBgvqoKizqf57ly6DwAS/T8h6fn2tnVvGAuQOZFx07ZAWSY9wDuIxEd0vA==", "dependencies": { - "Microsoft.Extensions.Configuration": "9.0.0", - "Microsoft.Extensions.Logging.Abstractions": "9.0.0", - "Microsoft.Maui.Controls.Core": "9.0.10", - "Microsoft.Maui.Controls.Xaml": "9.0.10" + "Microsoft.Extensions.Configuration": "8.0.0", + "Microsoft.Extensions.Logging.Abstractions": "8.0.2", + "Microsoft.Maui.Controls.Core": "8.0.100", + "Microsoft.Maui.Controls.Xaml": "8.0.100" } }, "Microsoft.NET.ILLink.Tasks": { @@ -55,168 +55,132 @@ }, "Microsoft.Extensions.Configuration": { "type": "Transitive", - "resolved": "9.0.0", - "contentHash": "YIMO9T3JL8MeEXgVozKt2v79hquo/EFtnY0vgxmLnUvk1Rei/halI7kOWZL2RBeV9FMGzgM9LZA8CVaNwFMaNA==", + "resolved": "8.0.0", + "contentHash": "0J/9YNXTMWSZP2p2+nvl8p71zpSwokZXZuJW+VjdErkegAnFdO1XlqtA62SJtgVYHdKu3uPxJHcMR/r35HwFBA==", "dependencies": { - "Microsoft.Extensions.Configuration.Abstractions": "9.0.0", - "Microsoft.Extensions.Primitives": "9.0.0" + "Microsoft.Extensions.Configuration.Abstractions": "8.0.0", + "Microsoft.Extensions.Primitives": "8.0.0" } }, "Microsoft.Extensions.Configuration.Abstractions": { "type": "Transitive", - "resolved": "9.0.0", - "contentHash": "lqvd7W3FGKUO1+ZoUEMaZ5XDJeWvjpy2/M/ptCGz3tXLD4HWVaSzjufsAsjemasBEg+2SxXVtYVvGt5r2nKDlg==", + "resolved": "8.0.0", + "contentHash": "3lE/iLSutpgX1CC0NOW70FJoGARRHbyKmG7dc0klnUZ9Dd9hS6N/POPWhKhMLCEuNN5nXEY5agmlFtH562vqhQ==", "dependencies": { - "Microsoft.Extensions.Primitives": "9.0.0" + "Microsoft.Extensions.Primitives": "8.0.0" } }, "Microsoft.Extensions.DependencyInjection": { "type": "Transitive", - "resolved": "9.0.0", - "contentHash": "MCPrg7v3QgNMr0vX4vzRXvkNGgLg8vKWX0nKCWUxu2uPyMsaRgiRc1tHBnbTcfJMhMKj2slE/j2M9oGkd25DNw==", + "resolved": "8.0.1", + "contentHash": "BmANAnR5Xd4Oqw7yQ75xOAYODybZQRzdeNucg7kS5wWKd2PNnMdYtJ2Vciy0QLylRmv42DGl5+AFL9izA6F1Rw==", "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.0" + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2" } }, "Microsoft.Extensions.DependencyInjection.Abstractions": { "type": "Transitive", - "resolved": "9.0.0", - "contentHash": "+6f2qv2a3dLwd5w6JanPIPs47CxRbnk+ZocMJUhv9NxP88VlOcJYZs9jY+MYSjxvady08bUZn6qgiNh7DadGgg==" + "resolved": "8.0.2", + "contentHash": "3iE7UF7MQkCv1cxzCahz+Y/guQbTqieyxyaWKhrRO91itI9cOKO76OHeQDahqG4MmW5umr3CcCvGmK92lWNlbg==" }, "Microsoft.Extensions.Logging": { "type": "Transitive", - "resolved": "9.0.0", - "contentHash": "crjWyORoug0kK7RSNJBTeSE6VX8IQgLf3nUpTB9m62bPXp/tzbnOsnbe8TXEG0AASNaKZddnpHKw7fET8E++Pg==", + "resolved": "8.0.1", + "contentHash": "4x+pzsQEbqxhNf1QYRr5TDkLP9UsLT3A6MdRKDDEgrW7h1ljiEPgTNhKYUhNCCAaVpQECVQ+onA91PTPnIp6Lw==", "dependencies": { - "Microsoft.Extensions.DependencyInjection": "9.0.0", - "Microsoft.Extensions.Logging.Abstractions": "9.0.0", - "Microsoft.Extensions.Options": "9.0.0" + "Microsoft.Extensions.DependencyInjection": "8.0.1", + "Microsoft.Extensions.Logging.Abstractions": "8.0.2", + "Microsoft.Extensions.Options": "8.0.2" } }, "Microsoft.Extensions.Logging.Abstractions": { "type": "Transitive", - "resolved": "9.0.0", - "contentHash": "g0UfujELzlLbHoVG8kPKVBaW470Ewi+jnptGS9KUi6jcb+k2StujtK3m26DFSGGwQ/+bVgZfsWqNzlP6YOejvw==", + "resolved": "8.0.2", + "contentHash": "nroMDjS7hNBPtkZqVBbSiQaQjWRDxITI8Y7XnDs97rqG3EbzVTNLZQf7bIeUJcaHOV8bca47s1Uxq94+2oGdxA==", "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.0", - "System.Diagnostics.DiagnosticSource": "9.0.0" + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2" } }, "Microsoft.Extensions.Options": { "type": "Transitive", - "resolved": "9.0.0", - "contentHash": "y2146b3jrPI3Q0lokKXdKLpmXqakYbDIPDV6r3M8SqvSf45WwOTzkyfDpxnZXJsJQEpAsAqjUq5Pu8RCJMjubg==", + "resolved": "8.0.2", + "contentHash": "dWGKvhFybsaZpGmzkGCbNNwBD1rVlWzrZKANLW/CcbFJpCEceMCGzT7zZwHOGBCbwM0SzBuceMj5HN1LKV1QqA==", "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.0", - "Microsoft.Extensions.Primitives": "9.0.0" + "Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0", + "Microsoft.Extensions.Primitives": "8.0.0" } }, "Microsoft.Extensions.Primitives": { "type": "Transitive", - "resolved": "9.0.0", - "contentHash": "N3qEBzmLMYiASUlKxxFIISP4AiwuPTHF5uCh+2CWSwwzAJiIYx0kBJsS30cp1nvhSySFAVi30jecD307jV+8Kg==" + "resolved": "8.0.0", + "contentHash": "bXJEZrW9ny8vjMF1JV253WeLhpEVzFo1lyaZu1vQ4ZxWUlVvknZ/+ftFgVheLubb4eZPSwwxBeqS1JkCOjxd8g==" }, "Microsoft.Maui.Controls.Build.Tasks": { "type": "Transitive", - "resolved": "9.0.10", - "contentHash": "EQpfTIjNuY/pfTG4+TbyEJAW63SoU0GuwdjY1E2sZIJdTxNFTD36nClmZJpVNWf4ySol8rPu2kfOznbDNhv35Q==", + "resolved": "8.0.100", + "contentHash": "fxN4/f6teRh+4j1WE8kqvt8O4B88z2637179dT4aZGFkDiMWBsfxOn+jjrDgwMIVyjFdCrGgtBUfrV9M7+AfnA==", "dependencies": { - "Microsoft.Maui.Controls.Core": "9.0.10", - "Microsoft.Maui.Controls.Xaml": "9.0.10" + "Microsoft.Maui.Controls.Core": "8.0.100", + "Microsoft.Maui.Controls.Xaml": "8.0.100" } }, "Microsoft.Maui.Controls.Core": { "type": "Transitive", - "resolved": "9.0.10", - "contentHash": "YBliIXb3Z0bAWjrldkIV9ku2o+ciejaypvQQyzebvA16A0wNmIYJY7uGdygVwSmpcPL73ZwwMCBPD4IqD1ogrg==", + "resolved": "8.0.100", + "contentHash": "LD4OSnfTN++obDYj2ldioTETIOI6jRZfZWpPydfPl/RCo3A2kadP6eL1SuuJdPafEgMP8UASdTXXCouY0LeFUA==", "dependencies": { - "Microsoft.Extensions.Configuration": "9.0.0", - "Microsoft.Extensions.DependencyInjection": "9.0.0", - "Microsoft.Extensions.Logging": "9.0.0", - "Microsoft.Extensions.Logging.Abstractions": "9.0.0", - "Microsoft.Maui.Core": "9.0.10" + "Microsoft.Extensions.Configuration": "8.0.0", + "Microsoft.Extensions.DependencyInjection": "8.0.1", + "Microsoft.Extensions.Logging": "8.0.1", + "Microsoft.Extensions.Logging.Abstractions": "8.0.2", + "Microsoft.Maui.Core": "8.0.100" } }, "Microsoft.Maui.Controls.Xaml": { "type": "Transitive", - "resolved": "9.0.10", - "contentHash": "5cgWqRdTAtzps/Qz2RB4XZ1x5usVHeSjFVHE8LV2WG1avEztSteGQGmvgDYjnJrGPnCNcp4S7Ivh6mxDJwHDQQ==", + "resolved": "8.0.100", + "contentHash": "GBfjikOi5FBkpQKcYQnzYwImcYMKGR0eSFGcE8rThc9VBaPGGoRq9ttMEGuY5QclVs7NtSmaYpf38ShGLbLcqw==", "dependencies": { - "Microsoft.Extensions.Configuration": "9.0.0", - "Microsoft.Maui.Controls.Core": "9.0.10", - "Microsoft.Maui.Core": "9.0.10" + "Microsoft.Extensions.Configuration": "8.0.0", + "Microsoft.Maui.Controls.Core": "8.0.100", + "Microsoft.Maui.Core": "8.0.100" } }, "Microsoft.Maui.Core": { "type": "Transitive", - "resolved": "9.0.10", - "contentHash": "7hrCvNUiF5hPLB+IDcFJ9ncD1ciPNJkUO1NxFMoeDKEttZqt/j8+za/XaGxRgzZWF1QaIXaee+WI8jwx4/G5+g==", + "resolved": "8.0.100", + "contentHash": "vo3/EKN62z5/UtIzb7gkUk0ssrzrRN27ihVeBlE0vhby1LrY29SKDBvHzEgLqmG/heT0pPeELNaeF6yInjHYvw==", "dependencies": { - "Microsoft.Extensions.Configuration": "9.0.0", - "Microsoft.Extensions.DependencyInjection": "9.0.0", - "Microsoft.Extensions.Logging": "9.0.0", - "Microsoft.Extensions.Logging.Abstractions": "9.0.0", - "Microsoft.Maui.Essentials": "9.0.10", - "Microsoft.Maui.Graphics": "9.0.10", - "System.Numerics.Vectors": "4.5.0", - "System.Text.Json": "9.0.0" + "Microsoft.Extensions.Configuration": "8.0.0", + "Microsoft.Extensions.DependencyInjection": "8.0.1", + "Microsoft.Extensions.Logging": "8.0.1", + "Microsoft.Extensions.Logging.Abstractions": "8.0.2", + "Microsoft.Maui.Essentials": "8.0.100", + "Microsoft.Maui.Graphics": "8.0.100" } }, "Microsoft.Maui.Essentials": { "type": "Transitive", - "resolved": "9.0.10", - "contentHash": "F7bpJf7YP8Yxc3+oF9JzVZzEGuw3Pn30ULYomIyFKaUJvw0ceKGhv/QnXrKpwfAY/xAXTN7p0MVsRrEf5BsS1A==", + "resolved": "8.0.100", + "contentHash": "quiPMYj10eDiKUkHLEEKAjuI0SAn7ZeZohmrh90Ebdl6fz4hVdDCmVfFyITGLtNbbSpkXvNJpeZwOWp2H5V9kQ==", "dependencies": { - "Microsoft.Maui.Graphics": "9.0.10", - "System.Numerics.Vectors": "4.5.0" + "Microsoft.Maui.Graphics": "8.0.100" } }, "Microsoft.Maui.Graphics": { "type": "Transitive", - "resolved": "9.0.10", - "contentHash": "QeM0B5H7OTqgY42sryVObbtvi55rWJPqFbBUZ6l344eaz07KsdUKon6WrcyJsuybVcLQcPV5HpLevFfk+lV0Yw==", - "dependencies": { - "System.Numerics.Vectors": "4.5.0" - } + "resolved": "8.0.100", + "contentHash": "FRvNIXnALXysAw0t0R5jmS4j4qs2n/NaWMcLrinMIoC2tQ/QIL68XEdN1OCtFRWvME8cR180TwSxpEjAIvlebA==" }, "Microsoft.Maui.Resizetizer": { "type": "Transitive", - "resolved": "9.0.10", - "contentHash": "cQLA4jeFF8mAVmqK6eJLSN374WK9+plVXpzxyVYd3Kes4d+JHRmjGrCrBDEkWlOXmH6jpAcGLlMa2utuuJDwOA==" + "resolved": "8.0.100", + "contentHash": "wEVBLYTe/tu30z9yR+tFupXiixqMaxkSp/xqC7FGlV6g9MvYo/wAcwTO+XWay2k/ug5qlxz6MXt5mEac7FMLmA==" }, "StyleCop.Analyzers.Unstable": { "type": "Transitive", "resolved": "1.2.0.556", "contentHash": "zvn9Mqs/ox/83cpYPignI8hJEM2A93s2HkHs8HYMOAQW0PkampyoErAiIyKxgTLqbbad29HX/shv/6LGSjPJNQ==" - }, - "System.Diagnostics.DiagnosticSource": { - "type": "Transitive", - "resolved": "9.0.0", - "contentHash": "ddppcFpnbohLWdYKr/ZeLZHmmI+DXFgZ3Snq+/E7SwcdW4UnvxmaugkwGywvGVWkHPGCSZjCP+MLzu23AL5SDw==" - }, - "System.IO.Pipelines": { - "type": "Transitive", - "resolved": "9.0.0", - "contentHash": "eA3cinogwaNB4jdjQHOP3Z3EuyiDII7MT35jgtnsA4vkn0LUrrSHsU0nzHTzFzmaFYeKV7MYyMxOocFzsBHpTw==" - }, - "System.Numerics.Vectors": { - "type": "Transitive", - "resolved": "4.5.0", - "contentHash": "QQTlPTl06J/iiDbJCiepZ4H//BVraReU4O4EoRw1U02H5TLUIT7xn3GnDp9AXPSlJUDyFs4uWjWafNX6WrAojQ==" - }, - "System.Text.Encodings.Web": { - "type": "Transitive", - "resolved": "9.0.0", - "contentHash": "e2hMgAErLbKyUUwt18qSBf9T5Y+SFAL3ZedM8fLupkVj8Rj2PZ9oxQ37XX2LF8fTO1wNIxvKpihD7Of7D/NxZw==" - }, - "System.Text.Json": { - "type": "Transitive", - "resolved": "9.0.0", - "contentHash": "js7+qAu/9mQvnhA4EfGMZNEzXtJCDxgkgj8ohuxq/Qxv+R56G+ljefhiJHOxTNiw54q8vmABCWUwkMulNdlZ4A==", - "dependencies": { - "System.IO.Pipelines": "9.0.0", - "System.Text.Encodings.Web": "9.0.0" - } } }, "net9.0": { @@ -234,14 +198,14 @@ }, "Microsoft.Maui.Controls": { "type": "Direct", - "requested": "[9.0.10, )", - "resolved": "9.0.10", - "contentHash": "3P2OU0vcTZqVXz4u2Pvux6P6IB/dvY9tBGBzYVYG/+GPa06nN1naNkGuOed4rdlspKqmj9TmFp4O0d6GIX0ieA==", + "requested": "[9.0.12, )", + "resolved": "9.0.12", + "contentHash": "8vJjqLWTvdvOZvHtFUByP9CqYI854zWp7NVFIAD7lJ93Ohd1gYSKBiwDFF9bz938DEGjubymK1/6cNXzFsVK8A==", "dependencies": { - "Microsoft.Maui.Controls.Build.Tasks": "9.0.10", - "Microsoft.Maui.Controls.Core": "9.0.10", - "Microsoft.Maui.Controls.Xaml": "9.0.10", - "Microsoft.Maui.Resizetizer": "9.0.10" + "Microsoft.Maui.Controls.Build.Tasks": "9.0.12", + "Microsoft.Maui.Controls.Core": "9.0.12", + "Microsoft.Maui.Controls.Xaml": "9.0.12", + "Microsoft.Maui.Resizetizer": "9.0.12" } }, "Microsoft.NET.ILLink.Tasks": { @@ -323,65 +287,65 @@ }, "Microsoft.Maui.Controls.Build.Tasks": { "type": "Transitive", - "resolved": "9.0.10", - "contentHash": "EQpfTIjNuY/pfTG4+TbyEJAW63SoU0GuwdjY1E2sZIJdTxNFTD36nClmZJpVNWf4ySol8rPu2kfOznbDNhv35Q==", + "resolved": "9.0.12", + "contentHash": "oaTP6enzFIVDPFTwkLY0g1O8lDawTPijClRcq5OT4B8sgiRWtQt6el5cTW7dSncyV4aePD+Ka+Z0rvhwmOxAsA==", "dependencies": { - "Microsoft.Maui.Controls.Core": "9.0.10", - "Microsoft.Maui.Controls.Xaml": "9.0.10" + "Microsoft.Maui.Controls.Core": "9.0.12", + "Microsoft.Maui.Controls.Xaml": "9.0.12" } }, "Microsoft.Maui.Controls.Core": { "type": "Transitive", - "resolved": "9.0.10", - "contentHash": "YBliIXb3Z0bAWjrldkIV9ku2o+ciejaypvQQyzebvA16A0wNmIYJY7uGdygVwSmpcPL73ZwwMCBPD4IqD1ogrg==", + "resolved": "9.0.12", + "contentHash": "ly27EAtymY1Cn8a0dHAG1RpffrBTQnJU7swJHQgU/NNb0U7+8nUKBmqhvlWuXfQfPr1ZEN1EGL38eDt6Nx3Ghg==", "dependencies": { "Microsoft.Extensions.Configuration": "9.0.0", "Microsoft.Extensions.DependencyInjection": "9.0.0", "Microsoft.Extensions.Logging": "9.0.0", "Microsoft.Extensions.Logging.Abstractions": "9.0.0", - "Microsoft.Maui.Core": "9.0.10" + "Microsoft.Maui.Core": "9.0.12" } }, "Microsoft.Maui.Controls.Xaml": { "type": "Transitive", - "resolved": "9.0.10", - "contentHash": "5cgWqRdTAtzps/Qz2RB4XZ1x5usVHeSjFVHE8LV2WG1avEztSteGQGmvgDYjnJrGPnCNcp4S7Ivh6mxDJwHDQQ==", + "resolved": "9.0.12", + "contentHash": "pBwDMimjxmtZiL6ukE7to+xNEH53VHxlrc1oFpDtK/scKZ7AWAGV09/ZTAPc5dv/Ii3B1Cysx0vWQ1CPUpr61A==", "dependencies": { "Microsoft.Extensions.Configuration": "9.0.0", - "Microsoft.Maui.Controls.Core": "9.0.10", - "Microsoft.Maui.Core": "9.0.10" + "Microsoft.Maui.Controls.Core": "9.0.12", + "Microsoft.Maui.Core": "9.0.12" } }, "Microsoft.Maui.Core": { "type": "Transitive", - "resolved": "9.0.10", - "contentHash": "7hrCvNUiF5hPLB+IDcFJ9ncD1ciPNJkUO1NxFMoeDKEttZqt/j8+za/XaGxRgzZWF1QaIXaee+WI8jwx4/G5+g==", + "resolved": "9.0.12", + "contentHash": "hI6wlNM2AYT3z0MFHhtEEmMGv4BaVWg/Pa9kLKJVCqnfyViPDBbMER9gAe7UTFVx4THLMHqXVqRw+8XhLSZpCg==", "dependencies": { "Microsoft.Extensions.Configuration": "9.0.0", "Microsoft.Extensions.DependencyInjection": "9.0.0", "Microsoft.Extensions.Logging": "9.0.0", "Microsoft.Extensions.Logging.Abstractions": "9.0.0", - "Microsoft.Maui.Essentials": "9.0.10", - "Microsoft.Maui.Graphics": "9.0.10" + "Microsoft.Maui.Essentials": "9.0.12", + "Microsoft.Maui.Graphics": "9.0.12" } }, "Microsoft.Maui.Essentials": { "type": "Transitive", - "resolved": "9.0.10", - "contentHash": "F7bpJf7YP8Yxc3+oF9JzVZzEGuw3Pn30ULYomIyFKaUJvw0ceKGhv/QnXrKpwfAY/xAXTN7p0MVsRrEf5BsS1A==", + "resolved": "9.0.12", + "contentHash": "qKjJ5c3vuh9gO0AG+CQ0EmIlKyt9bWo8nbcj5V58p7V4kBP7/i1mVMbZUuujC0pLRYpE1iAbuSrrklUrAzM4uQ==", "dependencies": { - "Microsoft.Maui.Graphics": "9.0.10" + "Microsoft.Maui.Graphics": "9.0.12" } }, "Microsoft.Maui.Graphics": { "type": "Transitive", - "resolved": "9.0.10", - "contentHash": "QeM0B5H7OTqgY42sryVObbtvi55rWJPqFbBUZ6l344eaz07KsdUKon6WrcyJsuybVcLQcPV5HpLevFfk+lV0Yw==" + "resolved": "9.0.12", + "contentHash": "Uue3f23FDUT5hyDxbTzSyj3c+Td/PaXtwUhi2xnQni7FFLgnrojWbxQ7+BGyXYoYsUj2VZ3VAbUIBiUhRBkbhA==" }, "Microsoft.Maui.Resizetizer": { "type": "Transitive", - "resolved": "9.0.10", - "contentHash": "cQLA4jeFF8mAVmqK6eJLSN374WK9+plVXpzxyVYd3Kes4d+JHRmjGrCrBDEkWlOXmH6jpAcGLlMa2utuuJDwOA==" + "resolved": "9.0.12", + "contentHash": "8X7cuptKpqMD8DB1FwKBqclyutjf5L4+7H5yZY6MyiBeUeFKMGIpJEpu2f4t3vwTwGhc/zKkjzFJj2ZW8+sf2g==" }, "StyleCop.Analyzers.Unstable": { "type": "Transitive", From f41c6edc8a34b9677c5b901eef9bebd5128a37a3 Mon Sep 17 00:00:00 2001 From: Edward Miller Date: Tue, 3 Dec 2024 18:57:38 -0600 Subject: [PATCH 3/4] use extension --- Maui.DataGrid.Sample/ViewModels/MainViewModel.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Maui.DataGrid.Sample/ViewModels/MainViewModel.cs b/Maui.DataGrid.Sample/ViewModels/MainViewModel.cs index 6d08d5f..8df757a 100644 --- a/Maui.DataGrid.Sample/ViewModels/MainViewModel.cs +++ b/Maui.DataGrid.Sample/ViewModels/MainViewModel.cs @@ -3,6 +3,7 @@ namespace Maui.DataGrid.Sample.ViewModels; using System.Collections.Immutable; using System.Collections.ObjectModel; using System.Diagnostics; +using CommunityToolkit.Maui.Core.Extensions; using CommunityToolkit.Maui.Views; using Maui.DataGrid.Sample.Models; using Maui.DataGrid.Sample.Utils; @@ -11,7 +12,8 @@ internal sealed class MainViewModel : ViewModelBase { public MainViewModel() { - Teams = new(DummyDataProvider.GetTeams()); + // To play with more data use DummyDataProvider.GetTeams(100) + Teams = DummyDataProvider.GetTeams().ToObservableCollection(); TeamColumnVisible = true; WonColumnVisible = true; HeaderBordersVisible = true; From d29693e104e457b0e4debedeed0a47de6d6b6c35 Mon Sep 17 00:00:00 2001 From: Edward Miller Date: Tue, 3 Dec 2024 18:57:54 -0600 Subject: [PATCH 4/4] generate realistic data --- .../Utils/DummyDataProvider.cs | 64 +++++++++++-------- 1 file changed, 38 insertions(+), 26 deletions(-) diff --git a/Maui.DataGrid.Sample/Utils/DummyDataProvider.cs b/Maui.DataGrid.Sample/Utils/DummyDataProvider.cs index 0e48070..fa58b9f 100644 --- a/Maui.DataGrid.Sample/Utils/DummyDataProvider.cs +++ b/Maui.DataGrid.Sample/Utils/DummyDataProvider.cs @@ -7,50 +7,64 @@ namespace Maui.DataGrid.Sample.Utils; internal static class DummyDataProvider { - private static List? _realTeams; + private static readonly List RealTeams = LoadTeamsFromResource(); public static List GetTeams(int numberOfCopies = 1) { - if (_realTeams == null) + if (numberOfCopies == 1) { - var assembly = typeof(DummyDataProvider).GetTypeInfo().Assembly; + return RealTeams; + } - using var stream = assembly.GetManifestResourceStream("Maui.DataGrid.Sample.teams.json") - ?? throw new FileNotFoundException("Could not load teams.json"); + return GenerateRandomTeams(numberOfCopies); + } - using var reader = new StreamReader(stream); - var json = reader.ReadToEnd(); + private static List LoadTeamsFromResource() + { + var assembly = typeof(DummyDataProvider).GetTypeInfo().Assembly; - _realTeams = JsonSerializer.Deserialize>(json) - ?? throw new InvalidOperationException("Could not deserialize teams.json"); - } + using var stream = assembly.GetManifestResourceStream("Maui.DataGrid.Sample.teams.json") + ?? throw new FileNotFoundException("Could not load teams.json"); - if (numberOfCopies == 1) - { - return _realTeams; - } + using var reader = new StreamReader(stream); + var json = reader.ReadToEnd(); + + return JsonSerializer.Deserialize>(json) + ?? throw new InvalidOperationException("Could not deserialize teams.json"); + } - var teams = new List(_realTeams); + private static List GenerateRandomTeams(int numberOfCopies) + { + var teams = new List(RealTeams); for (var i = 0; i < numberOfCopies; i++) { - foreach (var realTeam in _realTeams) + foreach (var realTeam in RealTeams) { + var totalGames = RandomNumberGenerator.GetInt32(72, 83); // Total games in a season + var won = RandomNumberGenerator.GetInt32(20, Math.Min(60, totalGames)); // Random wins between 20 and the lesser of 60 or total games + var lost = totalGames - won; // Losses are the remaining games + var homeWins = RandomNumberGenerator.GetInt32(10, Math.Min(won, totalGames / 2)); // Home wins between 10 and half of total games or total wins + var roadWins = won - homeWins; // Road wins are the remaining wins + var last10Wins = RandomNumberGenerator.GetInt32(0, Math.Min(10, won)); // Wins in the last 10 games, but not more than total wins + var streakResult = (GameResult)RandomNumberGenerator.GetInt32(0, 2); // Random streak result (Win or Loss) + var streakLength = Math.Min(10, streakResult == GameResult.Won ? won : lost); // Streak length between 0 and 10, but not more than total wins or losses + var randomTeam = new Team { Name = $"{realTeam.Name} {i}", - Won = RandomNumberGenerator.GetInt32(0, 50), - Lost = RandomNumberGenerator.GetInt32(0, 50), - Percentage = Math.Round(RandomDouble() * 100) / 100, + Won = won, + Lost = lost, + Percentage = (double)won / totalGames, Conf = $"{realTeam.Conf} {RandomNumberGenerator.GetInt32(1, 10)}", Div = $"{realTeam.Div} {RandomNumberGenerator.GetInt32(1, 10)}", - Home = $"{RandomNumberGenerator.GetInt32(1, 10)}", - Road = $"{RandomNumberGenerator.GetInt32(1, 10)}", - Last10 = $"{RandomNumberGenerator.GetInt32(1, 10)}", + Home = $"{homeWins}-{(totalGames / 2) - homeWins}", // Home record + Road = $"{roadWins}-{(totalGames / 2) - roadWins}", // Road record + Last10 = $"{last10Wins}-{10 - last10Wins}", // Last 10 games record Streak = new Streak { - Result = (GameResult)RandomNumberGenerator.GetInt32(0, 2), - NumStreak = RandomNumberGenerator.GetInt32(0, 10), + Result = streakResult, + NumStreak = streakLength, }, Logo = realTeam.Logo, }; @@ -61,6 +75,4 @@ public static List GetTeams(int numberOfCopies = 1) return teams; } - - private static double RandomDouble() => (double)RandomNumberGenerator.GetInt32(int.MaxValue) / int.MaxValue; }