ISEAddonTool 物件代表已安裝的附加工具,為 Windows PowerShell ISE 提供額外功能。 舉例來說,你可以點擊「檢視」,然後「顯示指令外掛」來顯示指令工具。 接著,你可透過操作各種可用的 ISEAddOnTool 物件來存取這個工具。
每個附加工具可以與垂直窗格或水平窗格相關聯。 垂直窗格會停靠在 Windows PowerShell 的右側邊緣。 水平面板則是卡在底部邊緣。
Windows PowerShell ISE 中的每個 PowerShell 分頁都可以安裝自己的附加工具。 請參閱 $psISE.CurrentPowerShellTab.HorizontalAddOnTools 與 $psISE.CurrentPowerShellTab.VerticalAddOnTools,以存取目前選中的分頁可用的工具集合,或在 $psISE.PowerShellTabs 集合物件中任一 PowerShellTab 物件上取得相同屬性。
Methods
目前沒有針對此類別物件的 Windows PowerShell ISE 專用方法。
屬性
管理
支援於 Windows PowerShell ISE 3.0 及以上版本,且早期版本中不存在此功能。
Control 屬性提供對指令外掛工具許多細節的讀取權限。
# View the properties of the Commands add-on tool.
# (assumes that it's visible in the vertical pane)
$psISE.CurrentVisibleVerticalTool.Control
HostObject : Microsoft.PowerShell.Host.ISE.ObjectModelRoot
Content :
HasContent :
ContentTemplate :
ContentTemplateSelector :
ContentStringFormat :
BorderBrush :
BorderThickness :
Background :
Foreground :
FontFamily :
FontSize :
FontStretch :
FontStyle :
FontWeight :
HorizontalContentAlignment :
VerticalContentAlignment :
TabIndex :
IsTabStop :
Padding :
Template : System.Windows.Controls.ControlTemplate
Style :
OverridesDefaultStyle :
UseLayoutRounding :
Triggers : {}
TemplatedParent :
Resources : {System.Windows.Controls.TabItem}
DataContext :
BindingGroup :
Language :
Name :
Tag :
InputScope :
ActualWidth : 370.75
ActualHeight : 676.559097412109
LayoutTransform :
Width :
MinWidth :
MaxWidth :
Height :
MinHeight :
MaxHeight :
FlowDirection : LeftToRight
Margin :
HorizontalAlignment :
VerticalAlignment :
FocusVisualStyle :
Cursor :
ForceCursor :
IsInitialized : True
IsLoaded :
ToolTip :
ContextMenu :
Parent :
HasAnimatedProperties :
InputBindings :
CommandBindings :
AllowDrop :
DesiredSize : 227.66,676.559097412109
IsMeasureValid : True
IsArrangeValid : True
RenderSize : 370.75,676.559097412109
RenderTransform :
RenderTransformOrigin :
IsMouseDirectlyOver : False
IsMouseOver : False
IsStylusOver : False
IsKeyboardFocusWithin : False
IsMouseCaptured :
IsMouseCaptureWithin : False
IsStylusDirectlyOver : False
IsStylusCaptured :
IsStylusCaptureWithin : False
IsKeyboardFocused : False
IsInputMethodEnabled :
Opacity :
OpacityMask :
BitmapEffect :
Effect :
BitmapEffectInput :
CacheMode :
Uid :
Visibility : Visible
ClipToBounds : False
Clip :
SnapsToDevicePixels : False
IsFocused :
IsEnabled :
IsHitTestVisible :
IsVisible : True
Focusable :
PersistId : 1
IsManipulationEnabled :
AreAnyTouchesOver : False
AreAnyTouchesDirectlyOver :
AreAnyTouchesCapturedWithin : False
AreAnyTouchesCaptured :
TouchesCaptured : {}
TouchesCapturedWithin : {}
TouchesOver : {}
TouchesDirectlyOver : {}
DependencyObjectType : System.Windows.DependencyObjectType
IsSealed : False
Dispatcher : System.Windows.Threading.Dispatcher
IsVisible
支援於 Windows PowerShell ISE 3.0 及以上版本,且早期版本中不存在此功能。
布林屬性,表示外掛工具是否在其指定的窗格中可見。 如果它是可見的,你可以將 IsVisible 屬性 $false 設為隱藏該工具,或將 IsVisible 屬性設為 , $true 讓附加工具在其 PowerShell 標籤中顯示。請注意,隱藏後,該附加工具將無法透過 CurrentVisibleHorizontalTool 或 CurrentVisibleVerticalTool 物件存取,因此無法透過該物件的這個屬性顯示。
# Hide the current tool in the vertical tool pane
$psISE.CurrentVisibleVerticalTool.IsVisible = $false
# Show the first tool on the currently selected PowerShell tab
$psISE.CurrentPowerShellTab.VerticalAddOnTools[0].IsVisible = $true
名稱
支援於 Windows PowerShell ISE 3.0 及以上版本,且早期版本中不存在此功能。
唯讀屬性,也就是附加工具名稱的來源。
# Gets the name of the visible vertical pane add-on tool.
$psISE.CurrentVisibleVerticalTool.Name
Commands