mirror of
https://github.com/rbalsleyMSFT/FFU.git
synced 2026-06-14 02:09:35 -06:00
Adds automatic column resizing to ListViews
- Enables automatic horizontal and vertical scrollbars for ListViews in the UI to improve navigation. - Introduces functions to dynamically calculate and apply column widths based on the visible content and header text. - Triggers column auto-resizing across various modules whenever ListView data is updated or refreshed. - Renames a path normalization function and updates an event handler parameter name for clarity.
This commit is contained in:
@@ -59,6 +59,7 @@ function Search-WingetApps {
|
||||
|
||||
# Update the ListView's ItemsSource using the passed-in State object
|
||||
$State.Controls.lstWingetResults.ItemsSource = $finalAppList.ToArray()
|
||||
Request-ListViewColumnAutoResize -ListView $State.Controls.lstWingetResults
|
||||
|
||||
# Update status text
|
||||
$statusText = ""
|
||||
@@ -178,6 +179,7 @@ function Import-WingetList {
|
||||
}
|
||||
|
||||
$State.Controls.lstWingetResults.ItemsSource = $newAppListForItemsSource.ToArray()
|
||||
Request-ListViewColumnAutoResize -ListView $State.Controls.lstWingetResults
|
||||
$State.Controls.txtAppListJsonPath.Text = $ofd.FileName
|
||||
|
||||
[System.Windows.MessageBox]::Show("Winget app list imported successfully.", "Success", "OK", "Information")
|
||||
|
||||
Reference in New Issue
Block a user