# Views

The RadAIPrompt control provides 3 default items that have as their content the default views. They will need to be included in its Items collection. The control supports only one instance of each view to be defined in this collection.

## Input view

The input view is represented by the **AIPromptInputView**. This view contains an input textbox that the user can type their request in. It also may display the custom suggestions that the user can add in the RadAIPrompt control.

> caption Figure 1: Input view

![WinForms RadAIPrompt Views](https://www.telerik.com/products/winforms/documentation/assets/f32e8ca8c2bf5953b6f73cb49bda0784/aiprompt-views001.png)

## Output view

The output view is represented by the **AIPromptOutputView**. This view displays the responses from your AI service. Each response is represented by an **AIPromptOutputItem** and represent the responses from the AI. AIPromptOutputItems are added to **OutputItems** collection.

> caption Figure 2: Output view

![WinForms RadAIPrompt Views](https://www.telerik.com/products/winforms/documentation/assets/d2694b820d7b23dfc77686ce5894cd04/aiprompt-views002.png)

The **AIPromptOutputItem** provides the following properties:

* **Title**: Gets or sets the title of the AIPromptOutputItem.
* **InputText**: Gets or sets the input text that end-user has requested and it is displayed by the AIPromptOutputItem.
* **ResponseText**: Gets or sets the response text provided by your AI model that the AIPromptOutputItem will display.
* **Rating**: Gets or sets the rating of the end-user for the response returned by your AI model.
* **Tag**: Gets or sets an object associated with this AIPromptOutputItem.

> note When an output from the AI is generated, the Output view shows Copy, Retry, and Rating buttons. Please check the [Structure](https://www.telerik.com/products/winforms/documentation/controls/aiprompt/structure) article.

## More Actions view

The More Actions View is an additional view in the toolbar that will display further actions defined by the user. This view is represented by a **AIPromptMoreActionsView**. It uses **RadAIPromptMoreActionsItem** which can be added to **RadAIPrompt.Items** collection. **RadAIPromptMoreActionsItem** offers:

* **ItemText**: Gets or sets the text of the item in the toolbar.
* **ItemSvgImage**: Gets or sets the SVG image of the item in the toolbar.
* **ItemImage**: Gets or sets the image of the item in the toolbar.

The following code snippet demonstrates how to add **RadAIPromptMoreActionsItem** to **AIPromptMoreActionsView**:

> caption Figure 3: More Actions view

![WinForms RadAIPrompt Views](https://www.telerik.com/products/winforms/documentation/assets/f25ba7da8ee0edb7be8fcd9e073590ea/aiprompt-views003.png)

```C#
private void SetupMoreActionsView()
{
    
    RadAIPromptMoreActionsItem moreActionsItem = new RadAIPromptMoreActionsItem();
    AIPromptMoreActionsView actionsView = moreActionsItem.GetView() as AIPromptMoreActionsView;
    actionsView.Padding = new Padding(16, 16, 16, 0);
    StackLayoutElementLite panel = actionsView.Panel as StackLayoutElementLite;

    panel.Children.Add(this.CreateHeaderLabel("Translate"));
    panel.Children.Add(this.CreateAction("German"));
    panel.Children.Add(this.CreateAction("English"));
    this.radAIPrompt1.Items.Add(moreActionsItem);
    
}

private LightVisualElement CreateHeaderLabel(string text)
{
    return new LightVisualElement()
    {
        Margin = new Padding(-5, 12, 0, 0),
        Font = new Font("Segoe UI Semibold", 10.5f),
        Text = text
    };
}
private RadButtonElement CreateAction(string text)
{
    RadButtonElement actionButton = new RadButtonElement(text)
    {
        TextAlignment = ContentAlignment.MiddleLeft,
        MinSize = new Size(120, 0)
    };
    return actionButton;
}
```

```VB.NET
Private Sub SetupMoreActionsView()
    Dim moreActionsItem As New RadAIPromptMoreActionsItem()
    Dim actionsView As AIPromptMoreActionsView = TryCast(moreActionsItem.GetView(), AIPromptMoreActionsView)
    actionsView.Padding = New Padding(16, 16, 16, 0)
    Dim panel As StackLayoutElementLite = TryCast(actionsView.Panel, StackLayoutElementLite)

    panel.Children.Add(Me.CreateHeaderLabel("Translate"))
    panel.Children.Add(Me.CreateAction("German"))
    panel.Children.Add(Me.CreateAction("English"))
    Me.RadAIPrompt1.Items.Add(moreActionsItem)
End Sub

Private Function CreateHeaderLabel(ByVal text As String) As LightVisualElement
    Dim element As New LightVisualElement()
    element.Margin = New Padding(-5, 12, 0, 0)
    element.Font = New Font("Segoe UI Semibold", 10.5F)
    element.Text = text
    Return element
End Function

Private Function CreateAction(ByVal text As String) As RadButtonElement
    Dim actionButton As New RadButtonElement(text)
    actionButton.TextAlignment = ContentAlignment.MiddleLeft
    actionButton.MinSize = New Size(120, 0)
    Return actionButton
End Function
```

## See Also

* [AIPrompt Button](https://www.telerik.com/products/winforms/documentation/controls/aiprompt/getting-started)
* [Getting Started](https://www.telerik.com/products/winforms/documentation/controls/aiprompt/aiprompt-button)
