From f98d3be85e0d3ca40af07cfbe0fec426c02908b2 Mon Sep 17 00:00:00 2001 From: "Mr.k" Date: Fri, 25 Oct 2024 13:11:53 +0300 Subject: [PATCH] Improve 'Invoke-WPFTab' Parameter by specifying its type (as expected by the function) and make it Mandatory --- functions/public/Invoke-WPFTab.ps1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/functions/public/Invoke-WPFTab.ps1 b/functions/public/Invoke-WPFTab.ps1 index 7333467f..8b3771b2 100644 --- a/functions/public/Invoke-WPFTab.ps1 +++ b/functions/public/Invoke-WPFTab.ps1 @@ -10,7 +10,10 @@ function Invoke-WPFTab { #> - Param ($ClickedTab) + Param ( + [Parameter(Mandatory,position=0)] + [string]$ClickedTab + ) $tabNav = Get-WinUtilVariables | Where-Object {$psitem -like "WPFTabNav"} $tabNumber = [int]($ClickedTab -replace "WPFTab","" -replace "BT","") - 1