RadioButtons.Header Property

Definition

Gets or sets the content for the group header.

public:
 property Platform::Object ^ Header { Platform::Object ^ get(); void set(Platform::Object ^ value); };
IInspectable Header();

void Header(IInspectable value);
public object Header { get; set; }
var object = radioButtons.header;
radioButtons.header = object;
Public Property Header As Object

Property Value

Object

Platform::Object

IInspectable

The content of the group header. The default is null.

Examples

This example shows a RadioButtons group with its Header set to "Background color".

<RadioButtons Header="Background color">
    <x:String>Red</x:String>
    <x:String>Green</x:String>
    <x:String>Blue</x:String>
</RadioButtons>

A RadioButtons group with its Header set to "Background color"

This example shows a RadioButtons group with it a complex header with an icon and text.

<RadioButtons>
    <RadioButtons.Header>
        <StackPanel Orientation="Horizontal">
            <SymbolIcon Symbol="Highlight"/>
            <TextBlock Text="Highlight color" Margin="8,0,0,0"/>
        </StackPanel>
    </RadioButtons.Header>
    <x:String>Yellow</x:String>
    <x:String>Green</x:String>
    <x:String>Pink</x:String>
</RadioButtons>

A RadioButtons group with its Header set to "Background color"

Remarks

For more info, design guidance, and code examples, see Radio buttons.

You typically use a string for the header, which is displayed as a text label above the radio buttons group. Other objects can also be used instead of a string.

You can set a data template for the header by using the HeaderTemplate property. If the HeaderTemplate property is set, it is used for the header and the Header property is ignored.

Applies to

See also