About syncfusion-wpf-ai-assistview
This skill guides WPF developers implementing chat interfaces with Syncfusion's `SfAIAssistView`. It covers message rendering and interaction, conversation history, UI customization, and patterns for connecting AI responses.
Key features
- 01Chat messages and response rendering
- 02Typing indicators and suggestions
- 03Input and response toolbars
- 04Prompt and stop events
- 05Conversation history navigation
- 06Empty states and input placeholders
Use cases
- 01Build an AI chat interface in WPF
- 02Show typing status and response suggestions
- 03Let users switch between conversations
- 04Customize message display and input controls
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ syncfusion/ wpf-ui-components-skills --skill syncfusion-wpf-ai-assistviewAfter installing, type/syncfusion-wpf-ai-assistviewin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
references/conversation-history.mdcustomization.mdevents-and-stop-responding.mdgetting-started.mdinput-toolbar.mdopenai-integration.mdresponse-toolbar.mdsuggestions-and-typing-indicator.mdDetails
From the project READMEImplementing SfAIAssistView (WPF)
When to Use This Skill
Use this skill when:
- Building AI chat or assistant UIs in WPF
- Displaying message threads with user and AI responses
- Integrating OpenAI or SemanticKernel with a chat interface
- Showing typing indicators while AI processes a response
- Adding suggestion chips after AI responses
- Customizing input/response toolbars
- Handling
PromptRequestevents or Stop Responding functionality - Rendering Markdown in AI responses via
ViewTemplateSelector - Persisting and switching between multiple conversations via conversation history
- Showing a placeholder/hint in the input box before the user types
- Rendering an empty-state (welcome message, call-to-action) when no messages exist
NuGet Package: Syncfusion.SfChat.Wpf
Namespace: Syncfusion.UI.Xaml.Chat
Key Classes: SfAIAssistView, TextMessage, AIMessage, Author, TypingIndicator, AssistConversationItem
Quick Start
<!-- MainWindow.xaml -->
<Window xmlns:syncfusion="clr-namespace:Syncfusion.UI.Xaml.Chat;assembly=Syncfusion.SfChat.WPF">
<Grid>
<Grid.DataContext>
<local:ViewModel/>
</Grid.DataContext>
<syncfusion:SfAIAssistView
Messages="{Binding Chats}"
CurrentUser="{Binding CurrentUser}"
Suggestions="{Binding Suggestions}"
ShowTypingIndicator="{Binding ShowTypingIndicator}"
TypingIndicator="{Binding TypingIndicator}" />
</Grid>
</Window>
// ViewModel.cs
public class ViewModel : INotifyPropertyChanged
{
public ObservableCollection<object> Chats { get; set; }
public Author CurrentUser { get; set; }
public ViewModel()
{
Chats = new ObservableCollection<object>();
CurrentUser = new Author { Name = "User" };
Chats.Add(new TextMessage
{
Author = CurrentUser,
Text = "Hello, how can you help me?"
});
Chats.Add(new TextMessage
{
Author = new Author { Name = "AI" },
Text = "I can answer questions and help with tasks."
});
}
}
Documentation and Navigation Guide
Getting Started
📄 Read: references/getting-started.md
- NuGet installation and assembly references
- XAML namespace and control declaration
- ViewModel setup with
ObservableCollection<object> TextMessage+Authorbinding patternCurrentUserconfiguration- Theme integration
OpenAI Integration
📄 Read: references/openai-integration.md
Microsoft.SemanticKernelNuGet setupIChatCompletionService+KernelconfigurationAIAssistChatServicepattern for async responsesCollectionChangedtrigger to invoke AI callsAIMessagewithContentTemplate(AI icon)ViewTemplateSelectorfor Markdown rendering via MdXaml- Coordinating
ShowTypingIndicatorwith async operations
Suggestions & Typing Indicator
📄 Read: references/suggestions-and-typing-indicator.md
Suggestionsproperty (IEnumerable<string>) binding- Updating suggestion chips after AI response
TypingIndicatorobject setup in ViewModelShowTypingIndicatorproperty- Toggling indicator on/off with async AI calls
Input Toolbar
📄 Read: references/input-toolbar.md
IsInputToolbarVisiblepropertyInputToolbarPosition(Left/Right)InputToolbarItem(ItemTemplate, IsEnabled, Tooltip, Visible)InputToolbarItemClickedevent handlingInputToolbarHeaderTemplatefor file-upload-style headers
Response Toolbar
📄 Read: references/response-toolbar.md
IsResponseToolbarVisibleproperty- Built-in toolbar items: Copy, Regenerate, Like, Dislike
ResponseToolbarItemwithIndex,ItemType,ItemTemplateResponseToolbarItemClickedevent handling- Custom item template examples
Events & Stop Responding
📄 Read: references/events-and-stop-responding.md
PromptRequestevent +PromptRequestEventArgsInputMessageandHandledproperty patternEnableStopRespondingpropertyStopRespondingevent andStopRespondingCommand(MVVM)StopRespondingTemplatecustomization
Conversation History
📄 Read: references/conversation-history.md
ShowNavigationViewproperty to show/hide the history paneConversations(ObservableCollection<AssistConversationItem>) data sourceAssistConversationItemwithTitle,DateTime, andAssistItemsmessagesNavigationHeaderfor the navigation pane header text- Built-in New Chat and conversation selection behavior
Customization (Empty View, Placeholder)
📄 Read: references/customization.md
EmptyViewfor simple text/objects in the empty stateEmptyViewTemplatefor richDataTemplateempty statesInputPlaceholderTextfor input-box hint text- How
EmptyViewinteracts withBannerTemplate
Key Properties
| Property | Type | Purpose |
|---|---|---|
Messages | ObservableCollection<object> | Chat message collection |
CurrentUser | Author | Identifies the local user |
Suggestions | IEnumerable<string> | Suggestion chips shown after AI response |
ShowTypingIndicator | bool | Shows/hides typing animation |
TypingIndicator | TypingIndicator | Typing indicator with Author |
IsInputToolbarVisible | bool | Shows custom input toolbar (default: false) |
IsResponseToolbarVisible | bool | Shows response toolbar (default: true) |
EnableStopResponding | bool | Enables Stop Responding button (default: false) |
ViewTemplateSelector | DataTemplateSelector | Custom rendering per message type |
ShowNavigationView | bool | Shows/hides the conversation history navigation pane (default: false) |
Conversations | ObservableCollection<AssistConversationItem> | Archived conversations shown in the history pane |
NavigationHeader | string | Header text for the navigation pane (default: empty) |
EmptyView | object | Simple content shown in the empty state |
EmptyViewTemplate | DataTemplate | Rich template shown in the empty state |
InputPlaceholderText | string | Placeholder/hint text in the input box |
Common Patterns
User sends message → AI responds
// Subscribe to CollectionChanged on Chats
Chats.CollectionChanged += async (s, e) =>
{
if (e.Action == NotifyCollectionChangedAction.Add
&& e.NewItems[0] is TextMessage msg
&& msg.Author.Name == CurrentUser.Name)
{
ShowTypingIndicator = true;
var reply = await aiService.GetResponseAsync(msg.Text);
Chats.Add(new AIMessage { Author = aiAuthor, Text = reply });
ShowTypingIndicator = false;
}
};
Adding suggestions after AI response
Suggestions = new List<string> { "Tell me more", "Give an example", "Summarize" };
Handling PromptRequest event
<syncfusion:SfAIAssistView PromptRequest="OnPromptRequest" />
private void OnPromptRequest(object sender, PromptRequestEventArgs e)
{
// e.InputMessage contains the user's text
e.Handled = true; // Prevent default processing
}
Showing conversation history
<syncfusion:SfAIAssistView
Messages="{Binding Chats}"
CurrentUser="{Binding CurrentUser}"
Conversations="{Binding Conversations}"
ShowNavigationView="True"
NavigationHeader="Sync AI Assist" />
Conversations = new ObservableCollection<AssistConversationItem>
{
new AssistConversationItem
{
Title = "Scotland",
DateTime = DateTime.Today,
AssistItems = new ObservableCollection<object>
{
new TextMessage { Author = CurrentUser, Text = "Tell me about Scotland." },
new TextMessage { Author = new Author { Name = "AI" }, Text = "Scotland is known for its castles and landscapes." }
}
}
};
Empty state with placeholder + welcome template
<syncfusion:SfAIAssistView
Messages="{Binding Chats}"
CurrentUser="{Binding CurrentUser}"
InputPlaceholderText="Type your message here...">
<syncfusion:SfAIAssistView.EmptyViewTemplate>
<DataTemplate>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Text="Hi, how can I help you?" FontSize="20" FontWeight="Bold" HorizontalAlignment="Center" />
<TextBlock Text="Ask anything to get started." FontSize="16" HorizontalAlignment="Center" />
</StackPanel>
</DataTemplate>
</syncfusion:SfAIAssistView.EmptyViewTemplate>
</syncfusion:SfAIAssistView>