適用于 CustomControl 之之 entryselectedby 的 SelectionCondition 元素

定義必須存在才能使用控制項定義的條件。 定義自訂控制項視圖時,會使用這個元素。

  • 組態元素
  • ViewDefinitions 元素
  • View 元素
  • CustomControl 元素
  • CustomEntries 元素
  • CustomEntry 元素
  • CustomItem 元素
  • 之 entryselectedby 元素
  • SelectionCondition 元素

Syntax

<SelectionCondition>
  <TypeName>Nameof.NetType</TypeName>
  <SelectionSetName>NameofSelectionSet</SelectionSetName>
  <PropertyName>.NetTypeProperty</PropertyName>
  <ScriptBlock>ScriptToEvaluate</ScriptBlock>
</SelectionCondition>

屬性和項目

下列各節說明屬性、子專案和元素的父元素 SelectionCondition

屬性

無。

子元素

元素 描述
適用于 CustomControl 的 SelectionCondition 的 PropertyName 元素(用於 View) 選擇性項目。

指定觸發條件的 .NET 屬性。
SelectionCondition for CustomControl for View 的 ScriptBlock 元素 選擇性項目。

指定觸發條件的腳本。
適用于 View 的自訂控制項之 SelectionCondition 的 SelectionSetName 元素 選擇性項目。

指定一組觸發條件的 .NET 類型。
適用于 CustomControl 的 SelectionCondition 的 TypeName 元素(適用于 View) 選擇性項目。

指定觸發條件的 .NET 型別。

父項目

|元素 |描述 | |-------------|-----------------| |CustomControl For View 的 CustomEntry 之 entryselectedby 元素|定義使用此控制項定義的 .NET 型別,或必須存在才能使用此定義的條件。 |

備註

當您定義選取條件時,適用下列需求:

  • 選取條件必須指定至少一個屬性名稱或腳本區塊,但不能同時指定兩者。
  • 選取條件可以指定任意數目的 .NET 類型或選取集,但不能同時指定兩者。

如需如何使用選取條件的詳細資訊,請參閱 定義資料顯示時的條件

另請參閱

適用于 CustomControl 的 SelectionCondition 的 PropertyName 元素(用於 View)

SelectionCondition for CustomControl for View 的 ScriptBlock 元素

適用于 View 的自訂控制項之 SelectionCondition 的 SelectionSetName 元素

適用于 CustomControl 的 SelectionCondition 的 TypeName 元素(適用于 View)

CustomControl for View 的 CustomEntry 之 entryselectedby 元素

撰寫 PowerShell 格式設定檔案