mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-06-28 09:04:47 -05:00
Add Right-Click Action on App Install Page (#3367)
* Add right click context menu for app entries with install, uninstall, and info options * Add hand cursor on mouse over for button in inputXML.xaml
This commit is contained in:
@ -18,7 +18,7 @@ function Initialize-InstallAppEntry {
|
||||
$border.Style = $sync.Form.Resources.AppEntryBorderStyle
|
||||
$border.Tag = $appKey
|
||||
$border.ToolTip = $Apps.$appKey.description
|
||||
$border.Add_MouseUp({
|
||||
$border.Add_MouseLeftButtonUp({
|
||||
$childCheckbox = ($this.Child | Where-Object {$_.Template.TargetType -eq [System.Windows.Controls.Checkbox]})[0]
|
||||
$childCheckBox.isChecked = -not $childCheckbox.IsChecked
|
||||
})
|
||||
@ -32,6 +32,13 @@ function Initialize-InstallAppEntry {
|
||||
$this.SetResourceReference([Windows.Controls.Control]::BackgroundProperty, "AppInstallUnselectedColor")
|
||||
}
|
||||
})
|
||||
$border.Add_MouseRightButtonUp({
|
||||
# Store the selected app in a global variable so it can be used in the popup
|
||||
$sync.appPopupSelectedApp = $this.Tag
|
||||
# Set the popup position to the current mouse position
|
||||
$sync.appPopup.PlacementTarget = $this
|
||||
$sync.appPopup.IsOpen = $true
|
||||
})
|
||||
|
||||
$checkBox = New-Object Windows.Controls.CheckBox
|
||||
$checkBox.Name = $appKey
|
||||
|
Reference in New Issue
Block a user