New to Telerik UI for .NET MAUI? Start a free 30-day trial

TabView Styling

The AIPrompt control displays the available views (Input, Output, Commands) in a TabView. You can modify the visual appearance of the TabView and each TabView header through the TabViewStyle property of the control.

The following example demonstrates how to modify the visual states of the TabView headers through the TabViewStyle property:

1. Add a Style property with TargetType set to RadTabView to the page's resources:

<Style x:Key="MyHeaderItemStyle" TargetType="telerik:TabViewHeaderItem">
    <Setter Property="TextColor" Value="#00897B" />
    <Setter Property="VisualStateManager.VisualStateGroups">
            <VisualStateGroup Name="CommonStates">
                <VisualState Name="Normal" />
                <VisualState Name="PointerOver">
                        <Setter Property="telerik:TabViewHeaderItem.BackgroundColor" Value="#D6EEEC" />
                <VisualState Name="Selected">
                        <Setter Property="telerik:TabViewHeaderItem.BackgroundColor" Value="#C4E6E3" />
                <VisualState Name="Disabled">
                        <Setter Property="telerik:TabViewHeaderItem.TextColor" Value="#6100897B" />
<Style x:Key="MyTabViewStyle" TargetType="telerik:RadTabView">
    <Setter Property="HeaderItemStyle" Value="{StaticResource MyHeaderItemStyle}" />

2. Add the RadAIPrompt control with TabViewStyle applied:

<telerik:RadAIPrompt x:Name="aiPrompt"
                     InputText="{Binding InputText}"
                     PromptRequestCommand="{Binding PromptRequestCommand}"
                     OutputItems="{Binding OutputItems}"
                     TabViewStyle="{StaticResource MyTabViewStyle}" />

Here is the result after applying the TabViewStyle:

Telerik .NET MAUI AIPrompt TabView Styling

See Also

In this article