ISEAddOnTool 对象
ISEAddonTool 对象表示已安装的加载项工具,该工具为 Windows PowerShell ISE 提供附加功能。 例如,可以通过单击 视图来显示 命令 工具,然后 显示命令加载项。 然后,可以通过作各种可用的 ISEAddOnTool 对象来访问此工具。
每个加载项工具都可以与垂直窗格或水平窗格相关联。 垂直窗格停靠在 Windows PowerShell ISE 的右边缘。 水平窗格停靠在底部边缘。
Windows PowerShell ISE 中的每个 PowerShell 选项卡都可以安装自己的一组加载项工具。 请参阅 $psISE.CurrentPowerShellTab.HorizontalAddOnTools 和 $psISE.CurrentPowerShellTab.VerticalAddOnTools,以访问 $psISE.PowerShellTabs 集合对象中任何 PowerShellTab 对象的工具集合。
方法
此类的对象没有特定于 Windows PowerShell ISE 的方法。
性能
控制
在 Windows PowerShell ISE 3.0 及更高版本中受支持,在早期版本中不存在。
Control 属性提供对命令加载项工具的许多详细信息的读取访问权限。
# View the properties of the Commands add-on tool.
# (assumes that it is 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
另请参阅
- ISEAddOnToolCollection 对象
- Windows PowerShell ISE 脚本对象模型的 用途
- ISE 对象模型层次结构