ISEAddOnTool 对象The ISEAddOnTool Object
本文内容
ISEAddonTool 对象表示已安装的可提供 Windows PowerShell ISE 附加功能的附加设备工具。例如,“命令”工具,你可以通过单击“查看”,然后单击“显示命令附加设备”进行显示。然后,你可以通过操作各种可用 ISEAddOnTool 对象来访问此工具。
每个附加设备工具可以与垂直窗格或水平窗格相关联。垂直窗格停靠在 Windows PowerShell ISE 的右边缘。水平窗格停靠在底部边缘。
Windows PowerShell ISE 中的每个 PowerShell 选项卡上可以安装自己的附加设备工具集。请参阅 $psISE.CurrentPowerShellTab.HorizontalAddOnTools 和 $psISE.CurrentPowerShellTab.VerticalAddOnTools 以访问可用于当前选定的选项卡或 $psISE.PowerShellTabs 集合对象中任何 PowerShellTab 对象上的相同属性的工具集合。
方法Methods
没有特定于 Windows PowerShell ISE 的方法可用于此类的对象。
“属性”Properties
控件Control
在 Windows PowerShell ISE 3.0 和更高版本中受支持,但不存在于早期版本中。
Control 属性提供对命令附加设备工具的大量详细信息的读取访问权限。
1. # View the properties of the Commands add-on tool.
2. # (assumes that it is visible in the vertical pane)
3. $psISE.CurrentVisibleVerticalTool.Control
4. HostObject : Microsoft.PowerShell.Host.ISE.ObjectModelRoot
5. Content :
6. HasContent :
7. ContentTemplate :
8. ContentTemplateSelector :
9. ContentStringFormat :
10. BorderBrush :
11. BorderThickness :
12. Background :
13. Foreground :
14. FontFamily :
15. FontSize :
16. FontStretch :
17. FontStyle :
18. FontWeight :
19. HorizontalContentAlignment :
20. VerticalContentAlignment :
21. TabIndex :
22. IsTabStop :
23. Padding :
24. Template : System.Windows.Controls.ControlTemplate
25. Style :
26. OverridesDefaultStyle :
27. UseLayoutRounding :
28. Triggers : {}
29. TemplatedParent :
30. Resources : {System.Windows.Controls.TabItem}
31. DataContext :
32. BindingGroup :
33. Language :
34. Name :
35. Tag :
36. InputScope :
37. ActualWidth : 370.75
38. ActualHeight : 676.559097412109
39. LayoutTransform :
40. Width :
41. MinWidth :
42. MaxWidth :
43. Height :
44. MinHeight :
45. MaxHeight :
46. FlowDirection : LeftToRight
47. Margin :
48. HorizontalAlignment :
49. VerticalAlignment :
50. FocusVisualStyle :
51. Cursor :
52. ForceCursor :
53. IsInitialized : True
54. IsLoaded :
55. ToolTip :
56. ContextMenu :
57. Parent :
58. HasAnimatedProperties :
59. InputBindings :
60. CommandBindings :
61. AllowDrop :
62. DesiredSize : 227.66,676.559097412109
63. IsMeasureValid : True
64. IsArrangeValid : True
65. RenderSize : 370.75,676.559097412109
66. RenderTransform :
67. RenderTransformOrigin :
68. IsMouseDirectlyOver : False
69. IsMouseOver : False
70. IsStylusOver : False
71. IsKeyboardFocusWithin : False
72. IsMouseCaptured :
73. IsMouseCaptureWithin : False
74. IsStylusDirectlyOver : False
75. IsStylusCaptured :
76. IsStylusCaptureWithin : False
77. IsKeyboardFocused : False
78. IsInputMethodEnabled :
79. Opacity :
80. OpacityMask :
81. BitmapEffect :
82. Effect :
83. BitmapEffectInput :
84. CacheMode :
85. Uid :
86. Visibility : Visible
87. ClipToBounds : False
88. Clip :
89. SnapsToDevicePixels : False
90. IsFocused :
91. IsEnabled :
92. IsHitTestVisible :
93. IsVisible : True
94. Focusable :
95. PersistId : 1
96. IsManipulationEnabled :
97. AreAnyTouchesOver : False
98. AreAnyTouchesDirectlyOver :
99. AreAnyTouchesCapturedWithin : False
100. AreAnyTouchesCaptured :
101. TouchesCaptured : {}
102. TouchesCapturedWithin : {}
103. TouchesOver : {}
104. TouchesDirectlyOver : {}
105. DependencyObjectType : System.Windows.DependencyObjectType
106. IsSealed : False
107. Dispatcher : System.Windows.Threading.Dispatcher
IsVisibleIsVisible
在 Windows PowerShell ISE 3.0 和更高版本中受支持,但不存在于早期版本中。
布尔值属性,指示附加设备工具当前是否在其已分配的窗格中可见。如果可见,则可以将 IsVisible 属性设置为 $false 以隐藏工具,或将 IsVisible 属性设置为 $true 以使附加设备工具在其 PowerShell 选项卡上可见。请注意,隐藏附加设备工具后,将无法再通过 CurrentVisibleHorizontalTool 或 CurrentVisibleVerticalTool 对象对其进行访问,因此无法使用该对象上的此属性使其可见。
1. # Hide the current tool in the vertical tool pane
2. $psISE.CurrentVisibleVerticalTool.IsVisible = $false
3. # Show the first tool on the currently selected PowerShell tab
4. $psISE.CurrentPowerShellTab.VerticalAddOnTools[0].IsVisible = $true
名称Name
在 Windows PowerShell ISE 3.0 和更高版本中受支持,但不存在于早期版本中。
只读属性,可获取附加设备工具的名称。
1. # Gets the name of the visible vertical pane add-on tool.
2. $psISE.CurrentVisibleVerticalTool.Name
3. Commands
