diff --git a/functions/private/Set-DownloadEngine.ps1 b/functions/private/Set-DownloadEngine.ps1
new file mode 100644
index 00000000..1b293a5d
--- /dev/null
+++ b/functions/private/Set-DownloadEngine.ps1
@@ -0,0 +1,28 @@
+function Set-DownloadEngine {
+ $CheckBoxes = $sync.GetEnumerator() | Where-Object { $_.Value -is [System.Windows.Controls.CheckBox] }
+ foreach ($CheckBox in $CheckBoxes) {
+ if ($CheckBox.Key.StartsWith("WPFInstall")) {
+ Switch ($sync.DownloadEngine) {
+ "Winget" {
+ if ($($sync.configs.applications.$($CheckBox.Name).winget) -eq "na"){
+ $CheckBox.Value.Visibility = "Collapsed"
+ }
+ else{
+ $CheckBox.Value.Visibility = "Visible"
+ }
+ }
+ "Chocolatey"{
+ if ($($sync.configs.applications.$($CheckBox.Name).chocolatey) -eq "na"){
+ $CheckBox.Value.Visibility = "Collapsed"
+ }
+ else {
+ $CheckBox.Value.Visibility = "Visible"
+ }
+ }
+ default{
+ $CheckBox.Value.Visibility = "Visible"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/scripts/main.ps1 b/scripts/main.ps1
index c1d476f4..809810dc 100644
--- a/scripts/main.ps1
+++ b/scripts/main.ps1
@@ -87,6 +87,19 @@ try {
$xaml.SelectNodes("//*[@Name]") | ForEach-Object {$sync["$("$($psitem.Name)")"] = $sync["Form"].FindName($psitem.Name)}
+#Initialize Download Engine
+$selectedItem = $sync.WPFselectDownloadEngine.SelectedItem
+$selectedText = $selectedItem.Content
+$sync.DownloadEngine = $selectedText
+Set-DownloadEngine
+
+$sync.WPFselectDownloadEngine.Add_SelectionChanged({
+ $selectedItem = $sync.WPFselectDownloadEngine.SelectedItem
+ $selectedText = $selectedItem.Content
+ $sync.DownloadEngine = $selectedText
+ Set-DownloadEngine
+})
+
$sync.keys | ForEach-Object {
if($sync.$psitem) {
if($($sync["$psitem"].GetType() | Select-Object -ExpandProperty Name) -eq "CheckBox" `
diff --git a/xaml/inputXML.xaml b/xaml/inputXML.xaml
index 332122b0..1370e2d4 100644
--- a/xaml/inputXML.xaml
+++ b/xaml/inputXML.xaml
@@ -793,6 +793,11 @@
+
+
+
+
+