mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-07-01 02:22:34 -05:00
Add logic to the new ToggleButtons in the sidebar of the install tab and remove old buttons
This commit is contained in:
@ -197,32 +197,6 @@ function Invoke-WPFUIApps {
|
||||
$null = $wrapPanelTop.Children.Add($selectedLabel)
|
||||
$sync.$($selectedLabel.Name) = $selectedLabel
|
||||
|
||||
$showSelectedAppsButton = New-Object Windows.Controls.Button
|
||||
$showSelectedAppsButton.Name = "ShowSelectedAppsButton"
|
||||
$showSelectedAppsButton.Content = "Show Selected"
|
||||
$showSelectedAppsButton.Add_Click({
|
||||
Show-OnlyCheckedApps -appKeys $sync.SelectedApps -ItemsControl $sync.ItemsControl
|
||||
})
|
||||
$sync.Buttons.Add($showSelectedAppsButton)
|
||||
|
||||
$null = $wrapPanelTop.Children.Add($showSelectedAppsButton)
|
||||
|
||||
$compactViewButton = New-Object Windows.Controls.Button
|
||||
$compactViewButton.Name = "CompactViewButton"
|
||||
$compactViewButton.Content = "Compact View"
|
||||
$compactViewButton.Add_Click({
|
||||
$sync.CompactView = -not $sync.CompactView
|
||||
Update-AppTileProperties
|
||||
if ($sync.SearchBar.Text -eq "") {
|
||||
Set-CategoryVisibility -Category "*" -ItemsControl $sync.ItemsControl -automaticVisibility
|
||||
}
|
||||
if ($sync.CompactView -eq $true) {
|
||||
$this.Content = "Expanded View"
|
||||
} else {
|
||||
$this.Content = "Compact View"
|
||||
}
|
||||
})
|
||||
$null = $wrapPanelTop.Children.Add($compactViewButton)
|
||||
[Windows.Controls.DockPanel]::SetDock($wrapPanelTop, [Windows.Controls.Dock]::Top)
|
||||
$null = $dockPanel.Children.Add($wrapPanelTop)
|
||||
return $dockPanel
|
||||
|
Reference in New Issue
Block a user