wpf-devexpress-ai-chat-control

Embed a Copilot-style AI chat interface in WPF apps using DevExpress AIChatControl.

Updated Dec 11, 2025
One-click install
npx skills add https://github.com/AleksaRistic216/dotnet-playground --skill wpf-devexpress-ai-chat-control-aleksaristic216
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wpf-devexpress-ai-chat-control
Source: https://github.com/AleksaRistic216/dotnet-playground/tree/main/.github/skills/wpf/wpf-devexpress-ai-chat-control
Command: npx skills add https://github.com/AleksaRistic216/dotnet-playground --skill wpf-devexpress-ai-chat-control-aleksaristic216

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Adding a conversational AI assistant to a WPF desktop application normally requires building the entire chat UI, streaming logic, Markdown rendering, and provider integration from scratch. This Skill guides you through embedding the DevExpress AIChatControl so the chat surface, streaming, file attachments, and history are handled for you. ## Core Features & Use Cases - Provider Integration: Register an IChatClient for Azure OpenAI, OpenAI, Ollama, or Semantic Kernel via AIExtensionsContainerDesktop at startup. - Rich Chat Features: Enable response streaming, Markdown rendering with sanitization, file attachments, prompt suggestions, and chat history persistence with SaveMessages/LoadMessages. - RAG & Multi-Client Scenarios: Build chat-with-your-data apps using the dx.wpf.aichatrag CLI template or the OpenAI Assistant API, and run multiple chat surfaces with keyed clients via ChatClientServiceKey. - Use Case: You are building a document Q&A assistant inside a WPF line-of-business app. Use this Skill to switch the project SDK to Microsoft.NET.Sdk.Razor, register an Azure OpenAI client, drop the AIChatControl into a ThemedWindow, and enable streaming plus Markdown rendering. ## Quick Start Ask the AI to add the DevExpress AIChatControl to your WPF project with an Azure OpenAI client, streaming, and Markdown rendering enabled.

Frequently Asked Questions about wpf-devexpress-ai-chat-control

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add an AI chat control to a WPF application?

Install the DevExpress.AIIntegration.Wpf.Chat NuGet package, change the project SDK to Microsoft.NET.Sdk.Razor, register an IChatClient in App.xaml.cs via AIExtensionsContainerDesktop.Default.RegisterChatClient, and place the AIChatControl inside a dx:ThemedWindow.

Which AI providers work with DevExpress AIChatControl?

AIChatControl works with any IChatClient implementation, including Azure OpenAI, OpenAI, self-hosted Ollama via OllamaSharp, and Semantic Kernel connectors. Each provider needs its own NuGet package and a registration call at application startup.

Does AIChatControl support .NET Framework or .NET 6?

No, AIChatControl requires .NET 8.0 or newer targeting Windows. It is not available on .NET Framework, .NET 6, or .NET 7, and there is no workaround for older frameworks.

Why is AIChatControl not found after installing the NuGet package?

The most common cause is the project SDK still set to Microsoft.NET.Sdk instead of Microsoft.NET.Sdk.Razor. The control hosts a Blazor component in a BlazorWebView, so the Razor SDK is required to compile it.

Why does AIChatControl throw WebView2RuntimeNotFoundException at launch?

The control renders through a BlazorWebView, which needs the WebView2 runtime on the target machine. Windows 11 includes it, but for Windows 10 or Windows Server you must distribute the Evergreen WebView2 runtime with your installer.

How do I render Markdown responses in WPF AI chat?

Set ContentFormat to Markdown and handle the MarkdownConvert event to convert Markdown to HTML, typically with Markdig. Always sanitize the resulting HTML with a library like HtmlSanitizer before assigning it to e.HtmlText, since AI output is untrusted.