New to Telerik UI for .NET MAUI? Start a free 30-day trial
AIPrompt Button
Updated over 6 months ago
The AIPrompt component can also be displayed as a button that will show a popup with an AIPrompt when interacted with.
To display the component as a button, create a new RadAIPromptButton instance and add the AIPrompt component inside it.
The RadAIPromptButton inherits from RadTemplatedButton and provides the following additional properties:
AIPrompt(RadAIPrompt)—Defines the correspondingRadAIPromptcontrol.Popup(RadPopup)—Defines the correspondingRadPopupcontrol.
Here is an example on how you can define an AIPrompt Button:
xaml
<telerik:RadAIPromptButton FontFamily="TelerikFontExamples"
Content=""
HorizontalOptions="End"
VerticalOptions="End">
<telerik:RadAIPrompt InputText="{Binding InputText}"
PromptRequestCommand="{Binding PromptRequestCommand}"
OutputItems="{Binding OutputItems}" />
</telerik:RadAIPromptButton>