Conversation
Removed many dependencies and updated the code to work with the new natively implemented features that are faster and better in terms of NAOT compatibility.
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR removes CommunityToolkit.WinUI package dependencies and updates the WinUI XAML/UI code to use replacements implemented under CommonCore.ToolKits (e.g., WrapPanel, SwitchPresenter, shadows/effects), aiming for improved performance and NativeAOT compatibility.
Changes:
- Removed CommunityToolkit.WinUI packages from both app projects and migrated XAML usages to
CommonCore.ToolKits. - Added/ported toolkit controls (
WrapPanel,SwitchPresenter, settings controls, shadows/effects) intoCommonCore. - Replaced CommunityToolkit-based animations/effects with direct WinUI Composition/Storyboard implementations.
Reviewed changes
Copilot reviewed 105 out of 105 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| Harden System Security/ReleaseNotes.txt | Simplifies release notes to dependency-related update. |
| Harden System Security/Pages/UpdatePageCustomMSIXPath.xaml | Swaps CommunityToolkit WrapPanel usage to CommonCore.ToolKits. |
| Harden System Security/Pages/UpdatePage.xaml | Migrates WrapPanel/SettingsCard types to CommonCore.ToolKits. |
| Harden System Security/Pages/Settings.xaml | Migrates Settings controls and updates SwitchPresenter/Case API to TargetValue. |
| Harden System Security/Pages/ServiceManager.xaml | Swaps WrapPanel to CommonCore.ToolKits. |
| Harden System Security/Pages/Protects/WindowsFirewall.xaml | Replaces WrapPanel with CommonCore.ToolKits control. |
| Harden System Security/Pages/Protects/OptionalWindowsFeatures.xaml | Replaces WrapPanel with CommonCore.ToolKits control. |
| Harden System Security/Pages/Protects/MicrosoftSecurityBaseline.xaml | Replaces WrapPanel with CommonCore.ToolKits control. |
| Harden System Security/Pages/Protects/MicrosoftDefender.xaml | Replaces WrapPanel with CommonCore.ToolKits control. |
| Harden System Security/Pages/Protects/Microsoft365AppsSecurityBaseline.xaml | Replaces WrapPanel with CommonCore.ToolKits control. |
| Harden System Security/Pages/Protects/CertificateChecking.xaml | Replaces WrapPanel with CommonCore.ToolKits control. |
| Harden System Security/Pages/Protects/BitLocker.xaml.cs | Removes CommunityToolkit usings and switches to CommonCore.ToolKits. |
| Harden System Security/Pages/Protects/BitLocker.xaml | Replaces WrapPanel with CommonCore.ToolKits control. |
| Harden System Security/Pages/Protects/ASR.xaml | Replaces WrapPanel with CommonCore.ToolKits control. |
| Harden System Security/Pages/Protect.xaml.cs | Replaces CommunityToolkit animation usage with direct Composition animation for shadow blur. |
| Harden System Security/Pages/Protect.xaml | Migrates shadow attached property and WrapPanel usage to CommonCore.ToolKits. |
| Harden System Security/Pages/Logs.xaml | Replaces WrapPanel with CommonCore.ToolKits control. |
| Harden System Security/Pages/LinkPreview.xaml | Replaces WrapPanel with CommonCore.ToolKits control. |
| Harden System Security/Pages/IntuneDeploymentDetails.xaml | Replaces WrapPanel with CommonCore.ToolKits control. |
| Harden System Security/Pages/Intune.xaml | Replaces WrapPanel with CommonCore.ToolKits control. |
| Harden System Security/Pages/InstalledAppsManagement.xaml | Replaces WrapPanel with CommonCore.ToolKits control. |
| Harden System Security/Pages/GroupPolicyEditor.xaml | Replaces WrapPanel with CommonCore.ToolKits control. |
| Harden System Security/Pages/GitHubDocumentation.xaml | Replaces WrapPanel with CommonCore.ToolKits control. |
| Harden System Security/Pages/FileReputation.xaml | Replaces WrapPanel with CommonCore.ToolKits control. |
| Harden System Security/Pages/Extras/EXIFManager.xaml | Replaces WrapPanel with CommonCore.ToolKits control. |
| Harden System Security/Pages/Extras/DuplicatePhotoFinder.xaml | Replaces WrapPanel with CommonCore.ToolKits control. |
| Harden System Security/Pages/Extras/BootableDriveMaker.xaml | Replaces WrapPanel with CommonCore.ToolKits control. |
| Harden System Security/Pages/CryptographicBillOfMaterials.xaml | Replaces WrapPanel with CommonCore.ToolKits control. |
| Harden System Security/Pages/CSP.xaml | Replaces WrapPanel with CommonCore.ToolKits control. |
| Harden System Security/Pages/AuditPolicies.xaml | Replaces WrapPanel with CommonCore.ToolKits control. |
| Harden System Security/MainWindow.xaml | Replaces WrapPanel with CommonCore.ToolKits control. |
| Harden System Security/Harden System Security.csproj | Removes CommunityToolkit packages; adjusts WindowsAppSDK package set; adds ProtectedData. |
| Harden System Security/CustomUIElements/SystemShutdownInfoDialog.xaml | Replaces WrapPanel with CommonCore.ToolKits control. |
| Harden System Security/CustomUIElements/OpenPortsDialog.xaml | Replaces WrapPanel with CommonCore.ToolKits control. |
| Harden System Security/CustomUIElements/MUnitListViewControl.xaml | Replaces WrapPanel with CommonCore.ToolKits control. |
| Harden System Security/CustomUIElements/HomePageCarousel/HeaderTile.xaml | Migrates shadow/effects and removes implicit toolkit animations. |
| Harden System Security/CustomUIElements/HomePageCarousel/HeaderCarousel.xaml | Migrates blur pipeline factory to CommonCore.ToolKits. |
| Harden System Security/CustomUIElements/GraphAuthPanel.xaml | Migrates SwitchPresenter/Case and WrapPanel to CommonCore.ToolKits. |
| Harden System Security/CustomUIElements/BitLockerSuspend.xaml | Removes CommunityToolkit controls xmlns. |
| Harden System Security/CustomUIElements/BitLockerEncryptDriveDialog.xaml | Migrates SwitchPresenter/Case and WrapPanel usage to CommonCore.ToolKits. |
| Harden System Security/CustomUIElements/AddKeyProtectorDialog.xaml | Migrates SwitchPresenter/Case and WrapPanel usage to CommonCore.ToolKits. |
| Harden System Security/App.xaml | Removes CommunityToolkit dictionaries/types; adds SettingsControls resources; migrates shadows and WrapPanel styles. |
| AppControl Manager/eXclude/CommonCore/ToolKits/WrapPanel.cs | Adds in-repo WrapPanel implementation derived from CommunityToolkit Primitives. |
| AppControl Manager/eXclude/CommonCore/ToolKits/SwitchPresenter.cs | Adds in-repo SwitchPresenter/Case implementation (Toolkit-derived). |
| AppControl Manager/eXclude/CommonCore/ToolKits/GridSplitter.cs | Minor refactor: uses Parent property directly. |
| AppControl Manager/eXclude/CommonCore/CommonCore.projitems | Includes new ToolKits sources when building WinUI. |
| AppControl Manager/ViewModels/PolicyEditorVM.cs | Removes CommunityToolkit controls using. |
| AppControl Manager/ReleaseNotes.txt | Simplifies release notes to dependency-related update. |
| AppControl Manager/Pages/ViewFileCertificates.xaml | Migrates WrapPanel to CommonCore.ToolKits. |
| AppControl Manager/Pages/ValidatePolicy.xaml | Migrates WrapPanel and SettingsCard to CommonCore.ToolKits. |
| AppControl Manager/Pages/UpdatePageCustomMSIXPath.xaml | Migrates WrapPanel to CommonCore.ToolKits. |
| AppControl Manager/Pages/UpdatePage.xaml | Migrates WrapPanel and SettingsCard to CommonCore.ToolKits. |
| AppControl Manager/Pages/SystemInformation/ViewOnlinePolicies.xaml | Migrates WrapPanel to CommonCore.ToolKits. |
| AppControl Manager/Pages/SystemInformation/ViewCurrentPolicies.xaml | Migrates WrapPanel to CommonCore.ToolKits. |
| AppControl Manager/Pages/SystemInformation/CodeIntegrityInfo.xaml | Migrates WrapPanel to CommonCore.ToolKits. |
| AppControl Manager/Pages/StrictKernelPolicyScanResults.xaml | Migrates WrapPanel to CommonCore.ToolKits. |
| AppControl Manager/Pages/Simulation.xaml | Migrates WrapPanel to CommonCore.ToolKits. |
| AppControl Manager/Pages/Settings.xaml | Migrates Settings controls and updates SwitchPresenter/Case API to TargetValue. |
| AppControl Manager/Pages/PolicyEditor.xaml | Migrates WrapPanel and SettingsCard to CommonCore.ToolKits. |
| AppControl Manager/Pages/MicrosoftDocumentation.xaml | Migrates WrapPanel to CommonCore.ToolKits. |
| AppControl Manager/Pages/MergePolicies.xaml | Migrates Settings controls and WrapPanel to CommonCore.ToolKits. |
| AppControl Manager/Pages/MDEAHPolicyCreation.xaml | Migrates WrapPanel and SwitchPresenter/Case usage to CommonCore.ToolKits. |
| AppControl Manager/Pages/EventLogsPolicyCreation.xaml | Migrates WrapPanel and SwitchPresenter/Case usage to CommonCore.ToolKits. |
| AppControl Manager/Pages/DeploymentPage.xaml | Migrates Settings controls and WrapPanel usage to CommonCore.ToolKits. |
| AppControl Manager/Pages/CreateSupplementalPolicyFilesAndFoldersScanResults.xaml | Migrates WrapPanel to CommonCore.ToolKits. |
| AppControl Manager/Pages/CreateSupplementalPolicy.xaml.cs | Replaces CommunityToolkit animation usage with direct Composition animation for shadow blur. |
| AppControl Manager/Pages/CreateDenyPolicyFilesAndFoldersScanResults.xaml | Migrates WrapPanel to CommonCore.ToolKits. |
| AppControl Manager/Pages/CreateDenyPolicy.xaml.cs | Replaces CommunityToolkit animation usage with direct Composition animation for shadow blur. |
| AppControl Manager/Pages/ConfigurePolicyRuleOptions.xaml | Migrates Settings controls and WrapPanel to CommonCore.ToolKits. |
| AppControl Manager/Pages/BuildNewCertificate.xaml | Migrates SettingsCard to CommonCore.ToolKits. |
| AppControl Manager/Pages/AllowNewApps/AllowNewAppsStart.xaml | Migrates WrapPanel usage to CommonCore.ToolKits. |
| AppControl Manager/Pages/AllowNewApps/AllowNewAppsLocalFilesDataGrid.xaml | Migrates WrapPanel usage to CommonCore.ToolKits. |
| AppControl Manager/Pages/AllowNewApps/AllowNewAppsEventLogsDataGrid.xaml | Migrates WrapPanel usage to CommonCore.ToolKits. |
| AppControl Manager/MainWindow.xaml | Migrates WrapPanel usage to CommonCore.ToolKits. |
| AppControl Manager/CustomUIElements/SystemShutdownInfoDialog.xaml | Migrates WrapPanel usage to CommonCore.ToolKits. |
| AppControl Manager/CustomUIElements/StickyHeaderBehaviorV2.cs | Replaces CommunityToolkit FindAscendant with local VisualTreeHelper-based implementation. |
| AppControl Manager/CustomUIElements/SigningDetailsDialogForRemoval.xaml | Migrates WrapPanel and SettingsCard usage to CommonCore.ToolKits. |
| AppControl Manager/CustomUIElements/SigningDetailsDialog.xaml | Migrates WrapPanel and SettingsCard usage to CommonCore.ToolKits. |
| AppControl Manager/CustomUIElements/SettingsCardV2.cs | Removes CommunityToolkit dependency and switches to CommonCore.ToolKits. |
| AppControl Manager/CustomUIElements/OpenPortsDialog.xaml | Migrates WrapPanel usage to CommonCore.ToolKits. |
| AppControl Manager/CustomUIElements/HomePageCarousel/HeaderTile.xaml.cs | Replaces CommunityToolkit animation sets with direct Composition animations. |
| AppControl Manager/CustomUIElements/HomePageCarousel/HeaderTile.xaml | Migrates shadow/effects and removes implicit toolkit animations. |
| AppControl Manager/CustomUIElements/HomePageCarousel/HeaderCarousel.xaml | Migrates blur pipeline factory to CommonCore.ToolKits. |
| AppControl Manager/CustomUIElements/HomePageCarousel/AnimatedImage.xaml.cs | Replaces CommunityToolkit opacity animation with Storyboard-driven opacity animation. |
| AppControl Manager/CustomUIElements/GraphAuthPanel.xaml | Migrates SwitchPresenter/Case and WrapPanel to CommonCore.ToolKits. |
| AppControl Manager/CustomUIElements/CustomPoliciesLibraryCacheLocationManagerDialog.xaml | Migrates WrapPanel usage to CommonCore.ToolKits. |
| AppControl Manager/CustomUIElements/CustomPatternBasedFilePath.xaml | Migrates WrapPanel usage to CommonCore.ToolKits. |
| AppControl Manager/CustomUIElements/ContentDialogV2.cs | Removes CommunityToolkit dependency and switches to CommonCore.ToolKits. |
| AppControl Manager/CustomUIElements/ButtonV2.cs | Removes CommunityToolkit dependency and switches to CommonCore.ToolKits. |
| AppControl Manager/CustomUIElements/AnimatedCancellableButton.cs | Removes CommunityToolkit dependency and switches to CommonCore.ToolKits. |
| AppControl Manager/AppControl Manager.csproj | Removes CommunityToolkit packages; adjusts WindowsAppSDK package set. |
| AppControl Manager/App.xaml | Removes CommunityToolkit dictionaries/types; adds SettingsControls resources; migrates shadows and WrapPanel styles. |
Comments suppressed due to low confidence (5)
Harden System Security/Pages/Protects/WindowsFirewall.xaml:1
- This XAML file now uses
CCToolKit:controls (e.g.,CCToolKit:WrapPanel) but the root<Page>no longer declares thexmlns:CCToolKit=\"using:CommonCore.ToolKits\"namespace. This will fail XAML compilation. Add theCCToolKitxmlns back on the root element (or update the prefix being used).
Harden System Security/Pages/CryptographicBillOfMaterials.xaml:1 - This file was updated to use
CCToolKit:WrapPanel, but thexmlns:CCToolKit=\"using:CommonCore.ToolKits\"namespace is not declared on the root<Page>. This will cause XAML parse/compile errors. Add the missing xmlns (or switch the control prefixes to a namespace that is declared).
AppControl Manager/eXclude/CommonCore/ToolKits/WrapPanel.cs:1 - When stretching the last child, the computed width/height does not account for the end padding (
paddingEnd.U). This can cause the last child to overlap the panel's right/bottom padding area. Adjust the calculation to subtractpaddingEnd.Uso the stretched child fills only the content area.
AppControl Manager/eXclude/CommonCore/ToolKits/WrapPanel.cs:1 - This loop can throw
ArgumentOutOfRangeExceptionif a child is measured as visible (thus included in_rows) but becomesCollapsedbefore arranging (common with bindings), because thewhileloop keeps incrementingchildIndexwithout bounds checks. Add achildIndex < Children.Countguard and break/return gracefully if no more visible children exist, or refresh rows when visibility changes.
Harden System Security/ReleaseNotes.txt:1 - The PR description indicates dependency removals and migration to native/in-repo implementations for performance/NativeAOT compatibility, but the release notes only mention 'Updated dependencies'. Consider updating the release notes to reflect the actual user-impacting change (CommunityToolkit removal + in-repo ToolKits replacements), and keep the corresponding
AppControl Manager/ReleaseNotes.txtconsistent.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 106 out of 106 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (5)
Harden System Security/Pages/Protects/WindowsFirewall.xaml:1
- This file now uses
CCToolKit:WrapPanelbut thexmlns:CCToolKit=\"using:CommonCore.ToolKits\"namespace declaration is not present in the page root (it was previously only declaringcontrols). This will break XAML compilation. Add thexmlns:CCToolKitdeclaration to the<Page>root.
Harden System Security/Pages/Protect.xaml.cs:1 - The
AnimateShadowBlurhelper is duplicated (same logic + easing/duration) across multiple pages in this PR (eg. Protect/CreateDenyPolicy/CreateSupplementalPolicy). Consider extracting this into a shared helper (eg. inCommonCore.ToolKitsas an extension method) to keep behavior consistent and avoid future drift when timing/easing needs tuning.
Harden System Security/Pages/Protect.xaml.cs:1 - Previously these pointer handlers wrapped animation start in a try/catch and logged failures; the new native Composition path has no exception handling. If
Effects.GetShadow(...)/GetElementContext(...)throws (eg. element not fully initialized or shadow infrastructure missing), this can crash the UI thread. Consider restoring a narrow try/catch around the animation kick-off (or makingAnimateShadowBlurexception-safe) so pointer hover can't bring down the app.
AppControl Manager/eXclude/CommonCore/ToolKits/WrapPanel.cs:1 - The doc comment references
WrapGrid, but this file definesWrapPanel. Update the<see cref=\"...\"/>reference so the documentation matches the actual control and doesn't mislead future maintainers.
AppControl Manager/eXclude/CommonCore/ToolKits/SwitchPresenter.cs:1 - Fix grammar in the doc comment: change 'An collection' to 'A collection'.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 108 out of 111 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (3)
Harden System Security/Harden System Security.csproj:1
- The
Microsoft.WindowsAppSDK.*package references are on different build versions (e.g.,WinUI1.8.260224000 vsBase1.8.251216001 vsFoundation1.8.260222000). Mixing WindowsAppSDK build numbers can cause NuGet resolution complexity and subtle runtime/ABI mismatches. Consider aligning these to a single consistent WindowsAppSDK build (or using central package management) so allMicrosoft.WindowsAppSDK.*components resolve to the same version set.
Harden System Security/ReleaseNotes.txt:1 - Use standard unit formatting: change '20MBs' to '20 MB' (or '20 MB+' / 'more than 20 MB').
AppControl Manager/ReleaseNotes.txt:1 - Use standard unit formatting: change '20MBs' to '20 MB' (or '20 MB+' / 'more than 20 MB').
Removed many dependencies and updated the code to work with the new natively implemented features that are faster and better in terms of NAOT compatibility.
….com/HotCakeX/Harden-Windows-Security into Dependency-improvements-and-removals
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 110 out of 113 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (11)
Harden System Security/Pages/Settings.xaml:1
- The comments still refer to
Valuematching semantics, but the code has been migrated toTargetValue. Update the comments to match the new API (TargetValue) to avoid misleading future maintenance.
AppControl Manager/eXclude/CommonCore/ToolKits/SwitchPresenter.cs:1 TargetTypeis a dependency property that can be null, andTargetValuecan also be null, but several helper APIs are declared with non-nullableType/objectparameters. This can lead to nullable warnings and makes the contract inaccurate. Prefer updating these signatures to accept nullable (Type?,object?) and adjust internal comparisons accordingly (they already partially handle nulls).
AppControl Manager/eXclude/CommonCore/ToolKits/SwitchPresenter.cs:1TargetTypeis a dependency property that can be null, andTargetValuecan also be null, but several helper APIs are declared with non-nullableType/objectparameters. This can lead to nullable warnings and makes the contract inaccurate. Prefer updating these signatures to accept nullable (Type?,object?) and adjust internal comparisons accordingly (they already partially handle nulls).
AppControl Manager/eXclude/CommonCore/ToolKits/SwitchPresenter.cs:1TargetTypeis a dependency property that can be null, andTargetValuecan also be null, but several helper APIs are declared with non-nullableType/objectparameters. This can lead to nullable warnings and makes the contract inaccurate. Prefer updating these signatures to accept nullable (Type?,object?) and adjust internal comparisons accordingly (they already partially handle nulls).
AppControl Manager/eXclude/CommonCore/ToolKits/SwitchPresenter.cs:1TargetTypeis a dependency property that can be null, andTargetValuecan also be null, but several helper APIs are declared with non-nullableType/objectparameters. This can lead to nullable warnings and makes the contract inaccurate. Prefer updating these signatures to accept nullable (Type?,object?) and adjust internal comparisons accordingly (they already partially handle nulls).
AppControl Manager/eXclude/CommonCore/ToolKits/SwitchPresenter.cs:1TargetTypeis a dependency property that can be null, andTargetValuecan also be null, but several helper APIs are declared with non-nullableType/objectparameters. This can lead to nullable warnings and makes the contract inaccurate. Prefer updating these signatures to accept nullable (Type?,object?) and adjust internal comparisons accordingly (they already partially handle nulls).
AppControl Manager/eXclude/CommonCore/ToolKits/SwitchPresenter.cs:1TargetTypeis a dependency property that can be null, andTargetValuecan also be null, but several helper APIs are declared with non-nullableType/objectparameters. This can lead to nullable warnings and makes the contract inaccurate. Prefer updating these signatures to accept nullable (Type?,object?) and adjust internal comparisons accordingly (they already partially handle nulls).
Harden System Security/Harden System Security.csproj:1- The set of
Microsoft.WindowsAppSDK.*package versions is not aligned (different build numbers across WinUI/Base/Foundation/InteractiveExperiences). This commonly results in NuGet downgrade/upgrade churn or runtime assembly version conflicts. Consider aligning these to the same WindowsAppSDK build train/version (or using whichever package strategy your repo standardizes on) to keep restores deterministic.
Harden System Security/Harden System Security.csproj:1 - The set of
Microsoft.WindowsAppSDK.*package versions is not aligned (different build numbers across WinUI/Base/Foundation/InteractiveExperiences). This commonly results in NuGet downgrade/upgrade churn or runtime assembly version conflicts. Consider aligning these to the same WindowsAppSDK build train/version (or using whichever package strategy your repo standardizes on) to keep restores deterministic.
Harden System Security/Harden System Security.csproj:1 - The set of
Microsoft.WindowsAppSDK.*package versions is not aligned (different build numbers across WinUI/Base/Foundation/InteractiveExperiences). This commonly results in NuGet downgrade/upgrade churn or runtime assembly version conflicts. Consider aligning these to the same WindowsAppSDK build train/version (or using whichever package strategy your repo standardizes on) to keep restores deterministic.
Harden System Security/Pages/Protects/MicrosoftDefender.xaml:1 - There are trailing spaces at the end of the
xmlns:xline. Trimming these avoids noisy diffs and keeps formatting consistent.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 106 out of 108 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (2)
AppControl Manager/Pages/CreateSupplementalPolicy.xaml.cs:1
- This
usingappears unused in the updated file (shadow blur is animated via Composition APIs). If warnings are treated as errors, this can break the build (CS8019). Remove it, or use the namespace if there’s intended Storyboard work here.
AppControl Manager/eXclude/CommonCore/ToolKits/WrapPanel.cs:1 <see cref=\"WrapGrid\"/>doesn’t match the implementation in this file (WrapPanel) and may not exist in this project. Updating the doc comment to reference<see cref=\"WrapPanel\"/>(or the correct type) will prevent misleading docs and avoids potential XML-doc warnings in builds that enable them.
Removed many dependencies and updated the code to work with the new natively implemented features that are faster and better in terms of NAOT compatibility. A total of 20 dependencies have been removed, 10 from each project.
What does this mean for end-users?