For the complete documentation index, see llms.txt. This page is also available as Markdown.

Bedingungen

Sie können die Komponente <Condition /> innerhalb von Widgets verwenden, um Abschnitte des Widgets optional anzuzeigen.

Skriptblock

Verwenden Sie das Attribut ScriptBlock, um einen Skriptblock zu definieren, der den Wert der Bedingung bestimmt. Der Skriptblock muss true oder false zurückgeben.

<Condition ScriptBlock="$Errors -eq $null">
</Condition>

Untergeordneter Inhalt

Der Abschnitt ChildContent wird angezeigt, wenn die Bedingung true ist.

<Condition ScriptBlock="$Errors -eq $null">
   <ChildContent>
      <Alert Message="Success!" />
   </ChildContent>
</Condition>

Else

Der Abschnitt Else wird angezeigt, wenn die Bedingung false ist.

<Condition ScriptBlock="$Errors -eq $null">
   <ChildContent>
      <Alert Message="Success!" />
   </ChildContent>
   <Else>
      <Alert Message="Failure!" Type="error" ShowIcon="true" />
   </Else>
</Condition>

Zuletzt aktualisiert

War das hilfreich?