> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/powershell-universal/de/apps/components/inputs/radio.md).

# Radio

Erstellen Sie Radio-Button-Gruppen in PowerShell Universal-Apps, damit Benutzer eine Option aus einer Reihe auswählen können, mit Standardwerten und Change-Event-Handlern.

Radio-Buttons ermöglichen es dem Benutzer, eine Option aus einer Reihe auszuwählen.

Verwenden Sie Radio-Buttons, wenn der Benutzer alle verfügbaren Optionen sehen muss. Wenn die verfügbaren Optionen eingeklappt werden können, sollten Sie ein Dropdown-Menü in Betracht ziehen, da es weniger Platz benötigt.

Bei Radio-Buttons sollte standardmäßig die am häufigsten verwendete Option ausgewählt sein.

## Einfaches Radio

```powershell
New-UDRadioGroup -Label "Day" -Content {
    New-UDRadio -Label Monday -Value 'monday'
    New-UDRadio -Label Tuesday -Value 'tuesday'
    New-UDRadio -Label Wednesday -Value 'wednesday'
    New-UDRadio -Label Thursday -Value 'thursday'
    New-UDRadio -Label Friday  -Value 'friday'
    New-UDRadio -Label Saturday -Value 'saturday'
    New-UDRadio -Label Sunday -Value 'sunday'
}
```

## OnChange

Ein Event-Handler, der aufgerufen wird, wenn die Radiogruppe geändert wird. Die Variable `$EventData` enthält den aktuellen Wert. Die Variable `$Body` enthält das vollständige JSON für die Veranstaltung.

```powershell
New-UDRadioGroup -Label "Day" -Content {
    New-UDRadio -Label Monday -Value 'monday'
    New-UDRadio -Label Tuesday -Value 'tuesday'
    New-UDRadio -Label Wednesday -Value 'wednesday'
    New-UDRadio -Label Thursday -Value 'thursday'
    New-UDRadio -Label Friday  -Value 'friday'
    New-UDRadio -Label Saturday -Value 'saturday'
    New-UDRadio -Label Sunday -Value 'sunday'
} -OnChange {
    Show-UDToast -Message `$EventData`
}
```

## Standardwert

Legen Sie den Standardwert der Radiogruppe fest.

```powershell
New-UDRadioGroup -Label "Day" -Content {
    New-UDRadio -Label Monday -Value 'monday'
    New-UDRadio -Label Tuesday -Value 'tuesday'
    New-UDRadio -Label Wednesday -Value 'wednesday'
    New-UDRadio -Label Thursday -Value 'thursday'
    New-UDRadio -Label Friday  -Value 'friday'
    New-UDRadio -Label Saturday -Value 'saturday'
    New-UDRadio -Label Sunday -Value 'sunday'
} -Value 'sunday'
```

## Benutzerdefinierte Formatierung

Sie können innerhalb der Radiogruppe eine benutzerdefinierte Formatierung verwenden. Das folgende Beispiel platziert die Radio-Buttons nebeneinander statt untereinander.

```powershell
New-UDRadioGroup -Label "Day" -Content {
    New-UDRow -Columns {
        New-UDColumn -LargeSize 1 -Content {
            New-UDRadio -Label Monday -Value 'monday'        
        }
        New-UDColumn -LargeSize 1 -Content {
            New-UDRadio -Label Sunday -Value 'sunday'
        }
    }
}
```

## API

* [New-UDRadio](/powershell-universal/de/powershell-befehle/new-udradio.md)
* [New-UDRadioGroup](/powershell-universal/de/powershell-befehle/new-udradiogroup.md)

### Siehe auch

* [Devolutions Academy – Hinzufügen der Funktion zur Benutzersuche](https://academy.devolutions.net/student/activity/3542903-part-2-adding-the-search-users-function)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.devolutions.net/powershell-universal/de/apps/components/inputs/radio.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
