ISEAddonTool 对象表示一个已安装的附加工具,为 Windows PowerShell ISE 提供额外功能。 例如,你可以点击“视图”,然后“显示命令附加”来显示命令工具。 通过作各种可用的 ISEAddOnTool 对象,你可以访问该工具。
每个附加工具可以关联垂直窗格或水平窗格。 垂直面板停靠在 Windows PowerShell ISE 的右侧边缘。 水平面板与底部边缘接合。
Windows PowerShell ISE中的每个PowerShell标签页都可以安装自己的一套附加工具。 请参见 $psISE.CurrentPowerShellTab.HorizontalAddOnTools 和 $psISE.CurrentPowerShellTab.VerticalAddOnTools 以访问当前选中的标签页可用的工具集合,或在 $psISE.PowerShellTabs 集合对象中任一 PowerShellTab 对象上的相同属性。
Methods
目前没有针对该类对象的 Windows PowerShell 专用方法。
属性
控件
Windows PowerShell ISE 3.0及以后版本支持,早期版本中不支持。
控制属性为命令附加工具的许多细节提供了读取权限。
# 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
Name
Windows PowerShell ISE 3.0及以后版本支持,早期版本中不支持。
只读属性,也就是附加工具名称的来源。
# Gets the name of the visible vertical pane add-on tool.
$psISE.CurrentVisibleVerticalTool.Name
Commands