Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
cbb234f
Merge pull request #2084 from Syncfusion-Content/hotfix/hotfix-v32.2.3
SyncfusionBuild Feb 6, 2026
f873409
Merge pull request #2086 from Syncfusion-Content/hotfix/hotfix-v32.2.3
SyncfusionBuild Feb 6, 2026
aeecb80
Merge pull request #2089 from Syncfusion-Content/hotfix/hotfix-v32.2.3
SyncfusionBuild Feb 10, 2026
23cf339
Merge pull request #2091 from Syncfusion-Content/hotfix/hotfix-v32.2.3
SyncfusionBuild Feb 12, 2026
bfbdad5
Merge pull request #2094 from Syncfusion-Content/hotfix/hotfix-v32.2.3
SyncfusionBuild Feb 16, 2026
dd1c53e
Merge pull request #2097 from Syncfusion-Content/hotfix/hotfix-v32.2.3
SyncfusionBuild Feb 23, 2026
267fd0c
Merge pull request #2098 from Syncfusion-Content/hotfix/hotfix-v32.2.3
SyncfusionBuild Feb 23, 2026
8bba246
Merge pull request #2103 from Syncfusion-Content/hotfix/hotfix-v32.2.3
SyncfusionBuild Mar 2, 2026
5539a75
Merge pull request #2109 from Syncfusion-Content/hotfix/hotfix-v32.2.3
SyncfusionBuild Mar 9, 2026
7ec4202
Merge pull request #2110 from Syncfusion-Content/hotfix/hotfix-v32.2.3
SyncfusionBuild Mar 10, 2026
0ac14fb
Merge pull request #2111 from Syncfusion-Content/development
SyncfusionBuild Mar 15, 2026
ad2f70d
Provided UG content for SfToastNotification
Karthick-Arjunan Mar 16, 2026
b39f0e2
updated the toc
Karthick-Arjunan Mar 16, 2026
2fe7d9b
Merge pull request #2128 from syncfusion-content/ToastNotification-Up…
durga-muthu Mar 16, 2026
d7a126e
Prepare UG for new WPF TabbedWindow control
harinath-2699 Mar 16, 2026
fcb59fb
Fix platform capitalization and wording in tab-management.md
durga-muthu Mar 16, 2026
cd177ac
Fix platform casing in data-binding.md
durga-muthu Mar 16, 2026
45dce52
Fix platform casing in getting-started.md
durga-muthu Mar 16, 2026
c336979
Fix platform casing in merge-tabs.md
durga-muthu Mar 16, 2026
308c4ed
Fix list item tag in Tabbed Window section
durga-muthu Mar 16, 2026
24a439e
Clean up data-binding.md by removing tabs section
durga-muthu Mar 16, 2026
2ae78a3
Remove image references from merge-tabs.md
durga-muthu Mar 16, 2026
9f2c21b
Task (WPF -1013622): Prepare the UG documentation for WPF MarkdownVie…
Mar 16, 2026
9d74375
meta data files modified
durga-muthu Mar 16, 2026
d0f0087
Merge branch 'TabbedWindow-UG-master' of https://github.com/syncfusio…
durga-muthu Mar 16, 2026
79c6c9c
Removed images
durga-muthu Mar 16, 2026
9f1465c
Merge pull request #2129 from syncfusion-content/TabbedWindow-UG-master
durga-muthu Mar 16, 2026
094e3e2
Merge pull request #2131 from syncfusion-content/mark
durga-muthu Mar 16, 2026
fc13f49
ES-1009988 Updated the API Link for the ExcelLikeSelection.
Malini-SF4235 Mar 17, 2026
59e1d25
UG documentation for SmartTextEditor
umanagarajan12 Mar 17, 2026
626800c
Resolved failuere
durga-muthu Mar 17, 2026
e991cd9
Updated.
Ganesh-Mariappan22 Mar 17, 2026
41d92d6
Merge pull request #2134 from syncfusion-content/UpdateUGCorrections
SubashiniMahendran Mar 17, 2026
22cc0f8
Merge pull request #2137 from syncfusion-content/Toast-Publish-Issue
SubashiniMahendran Mar 17, 2026
e471ab1
Included images in UG for new WPF TabbedWindow control
harinath-2699 Mar 17, 2026
cd99e4e
Update tab-management.md
harinath-2699 Mar 17, 2026
6e78ff8
1014306- Update WPF Maps and Gantt Control API links in required plac…
sanjayvikramsf4373 Mar 17, 2026
d6df249
Changes committed
harinath-2699 Mar 17, 2026
e8c88b1
Merge pull request #2143 from syncfusion-content/1014306-Maps_Update_…
Karthickmani97 Mar 17, 2026
05cea3b
Updated gif with the required size
harinath-2699 Mar 18, 2026
58d0944
ES-1009988 Addressed the review concerns.
Malini-SF4235 Mar 18, 2026
4b5c9ed
1014306- Update WPF Gantt Control Gif Image for Virtualization [Hot…
sanjayvikramsf4373 Mar 18, 2026
f0ece74
Merge pull request #2141 from syncfusion-content/TabbedWindow-UG-hotfix
durga-muthu Mar 18, 2026
b6ea194
Updated the md file name
Karthick-Arjunan Mar 18, 2026
089c622
Updated in toc
Karthick-Arjunan Mar 18, 2026
3f78a8b
Merge pull request #2146 from syncfusion-content/ToastNotification-ho…
durga-muthu Mar 18, 2026
2ba67de
ES-1009988 Committed the changes to the GitHub.
Malini-SF4235 Mar 18, 2026
3b554ff
Merge pull request #2145 from syncfusion-content/1014306-Gantt_image_…
Karthickmani97 Mar 18, 2026
3e3c456
Merge pull request #2133 from syncfusion-content/ES-1009988
SathiyathanamSathish Mar 18, 2026
02ccca5
Add API links to UG
AravinthSundaramSF Mar 18, 2026
98ebf75
Updated Getting started page
umanagarajan12 Mar 18, 2026
a98d708
Updated description of SmartTextEditor files
umanagarajan12 Mar 18, 2026
ed79988
fixed compilation error
umanagarajan12 Mar 18, 2026
4f6b10c
Merge pull request #2151 from syncfusion-content/PublishingIssueUG
SubashiniMahendran Mar 18, 2026
324e008
Documentation(1004602): Update the API links for the EmptyContent and…
Usha4947 Mar 19, 2026
572d6ce
removed the tabcontents tag
umanagarajan12 Mar 19, 2026
fe9b3d4
Merge pull request #2155 from syncfusion-content/PublishingIssueUG
SubashiniMahendran Mar 19, 2026
26d10b2
1014306- Address the correction in UG Gantt and maps [Hotfix]
sanjayvikramsf4373 Mar 19, 2026
32adb0e
1014306 - revert the unwanted spaces
sanjayvikramsf4373 Mar 19, 2026
df79928
ES-1004602: Updated the API Links
Usha4947 Mar 19, 2026
8f582fa
Merge pull request #2150 from syncfusion-content/TreeGridSerializatio…
ChidanandMurugaiah Mar 19, 2026
5f87ae1
Merge pull request #2156 from syncfusion-content/1014306-Address_the_…
Karthickmani97 Mar 20, 2026
e10be6c
Updated corrections in the getting-started
umanagarajan12 Mar 20, 2026
dc635db
Merge pull request #2154 from syncfusion-content/ES_1004602_UpdateAPI
SathiyathanamSathish Mar 22, 2026
b2d27d3
Added the release notes MD file and corresponding node entry in the T…
DeepakRajSundar Mar 23, 2026
24c8483
Added skills.md
Jothika4341 Mar 25, 2026
6d9724a
Merge pull request #2162 from syncfusion-content/SmartTextEditorUGUpdate
SubashiniMahendran Mar 25, 2026
7f10375
Updated skills.md
Jothika4341 Mar 25, 2026
fbda179
Updated the changes
Jothika4341 Mar 25, 2026
9320e18
Updated the changes in toc
Jothika4341 Mar 25, 2026
2f8cd81
Merge pull request #2167 from syncfusion-content/wpf-skill-hotfix
thangapriyavalasubramanian Mar 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 58 additions & 1 deletion wpf-toc.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
<li>
<a href="/cr/wpf"> API Reference</a>
</li>
<li>
<a href="/wpf/skills">Skills</a>
</li>
<li>
<a href="/wpf/Welcome-to-Syncfusion-Essential-WPF">Overview</a>
</li>
Expand Down Expand Up @@ -133,6 +136,21 @@
</li>
<li>Smart Components
<ul>
<li>
Common
<ul>
<li><a href="/wpf/Common/configure-ai-service">Configure Chat Client</a></li>
<li><a href="/wpf/Common/custom-ai-service">Custom AI Service</a></li>
<li>AI Services
<ul>
<li> <a href="/wpf/Common/claude-service">Claude AI Service</a></li>
<li> <a href="/wpf/Common/gemini-service">Gemini AI Service</a></li>
<li> <a href="/wpf/Common/deepseek-service">Deepseek AI Service</a></li>
<li> <a href="/wpf/Common/groq-service">Groq AI Service</a></li>
</ul>
</li>
</ul>
</li>
<li>
SfSmartDataGrid
<ul>
Expand All @@ -142,6 +160,16 @@
<li><a href="/wpf/Smart-DataGrid/customization">Customization</a></li>
</ul>
</li>
<li>
SfSmartTextEditor
<ul>
<li><a href="/wpf/SmartTextEditor/overview">Overview</a></li>
<li><a href="/wpf/SmartTextEditor/getting-started">Getting Started</a></li>
<li><a href="/wpf/SmartTextEditor/suggestion-display-mode">Suggestion Mode</a></li>
<li><a href="/wpf/SmartTextEditor/commands">Commands</a></li>
<li><a href="/wpf/SmartTextEditor/customization">Customization</a></li>
</ul>
</li>
</ul>
</li>
<li>
Expand Down Expand Up @@ -1298,6 +1326,16 @@
</ul>
</li>
</ul>
</li>
<li>
SfMarkdownViewer
<ul>
<li><a href="/wpf/MarkdownViewer/Overview">Overview</a></li>
<li><a href="/wpf/MarkdownViewer/Getting-Started">Getting Started</a></li>
<li><a href="/wpf/MarkdownViewer/Loading-Content">Loading Content</a></li>
<li><a href="/wpf/MarkdownViewer/Mermaid-Diagrams">Mermaid Support</a></li>
<li><a href="/wpf/MarkdownViewer/Events">Events</a></li>
</ul>
</li>
<li>
SfMaskedEdit
Expand Down Expand Up @@ -1825,6 +1863,16 @@
<li><a href="/wpf/TabControl/appearance">Appearance</a></li>
</ul>
</li>
<li>
Tabbed Window
<ul>
<li><a href="/wpf/Tabbed-Window/Overview">Overview</a></li>
<li><a href="/wpf/Tabbed-Window/getting-started">Getting Started</a></li>
<li><a href="/wpf/Tabbed-Window/tab-management">Tab Management</a></li>
<li><a href="/wpf/Tabbed-Window/data-binding">Data Binding</a></li>
<li><a href="/wpf/Tabbed-Window/merge-tabs">Merge Tabs</a></li>
</ul>
</li>
<li>
TabNavigation
<ul>
Expand Down Expand Up @@ -1937,6 +1985,15 @@
<li><a href="/wpf/TimeSpan-Editor/appearance">Appearance</a></li>
</ul>
</li>
<li>
Toast Notification
<ul>
<li><a href="/wpf/Toast-Notification/overview">Overview</a></li>
<li><a href="/wpf/Toast-Notification/getting-started">Getting Started</a></li>
<li><a href="/wpf/Toast-Notification/appearance-and-styling">Appearance and Styling</a></li>
<li><a href="/wpf/Toast-Notification/customization">Customization</a></li>
</ul>
</li>
<li>
ToolBarAdv
<ul>
Expand Down Expand Up @@ -2315,7 +2372,7 @@
Word Library (DocIO)
</li>
<li>Release Notes
<ul><li>2026 Volume 1 - v33.*<ul><li><a href="/wpf/release-notes/v33.1.44">v33.1.44 Main Release</a></li></ul></li>
<ul><li>2026 Volume 1 - v33.*<ul><li> Weekly Nuget Release <ul><li><a href="/wpf/release-notes/v33.1.45">v33.1.45</a></li></ul></li><li><a href="/wpf/release-notes/v33.1.44">v33.1.44 Main Release</a></li></ul></li>
<li>2025 Volume 4 - v32.*
<ul>
<li> Weekly Nuget Release
Expand Down
176 changes: 176 additions & 0 deletions wpf/Common/claude-service.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
---
layout: post
title: Claude AI for AI-Powered Components | Syncfusion®
description: Learn how to implement a custom AI service using the Claude API with Syncfusion<sup>&reg;</sup> AI-Powered Components.
platform: wpf
control: SmartComponents
documentation: ug
---

# Claude AI Integration with WPF Smart Components

The Syncfusion WPF AI-powered components can enhance applications with intelligent capabilities. You can integrate Anthropic `Claude AI` using the `IChatInferenceService` interface, which acts as a bridge between the editor and your custom AI service.

## Setting Up Claude

1. **Create an Anthropic Account**
Visit [Anthropic Console](https://console.anthropic.com), sign up, and complete the verification process.
2. **Obtain an API Key**
Navigate to [API Keys](https://console.anthropic.com/settings/keys) and click "Create Key."
3. **Review Model Specifications**
Refer to [Claude Models Documentation](https://docs.anthropic.com/claude/docs/models-overview) for details on available models.

## Define Request and Response Models

Create a file named `ClaudeModels.cs` in the Services folder and add:

{% tabs %}
{% highlight c# tabtitle="ClaudeModels.cs" %}

public class ClaudeChatRequest
{
public string? Model { get; set; }
public int Max_tokens { get; set; }
public List<ClaudeMessage>? Messages { get; set; }
public List<string>? Stop_sequences { get; set; }
}

public class ClaudeMessage
{
public string? Role { get; set; }
public string? Content { get; set; }
}

public class ClaudeChatResponse
{
public List<ClaudeContentBlock>? Content { get; set; }
}

public class ClaudeContentBlock
{
public string? Text { get; set; }
}

{% endhighlight %}
{% endtabs %}

## Create a Claude AI Service

This service handles communication with the Claude API, including authentication and response parsing.

1. Create a `Services` folder in your project.
2. Add a new file named `ClaudeAIService.cs` in the `Services` folder.
3. Implement the service as shown below:

{% tabs %}
{% highlight c# tabtitle="ClaudeAIService.cs" %}

using System.Net;
using System.Text;
using System.Text.Json;
using Microsoft.Extensions.AI;

public class ClaudeAIService
{
private readonly string _apiKey = ""; // API key
private readonly string _modelName = "claude-3-5-sonnet-20241022"; // Example model
private readonly string _endpoint = "https://api.anthropic.com/v1/messages";
private static readonly HttpClient HttpClient = new(new SocketsHttpHandler
{
PooledConnectionLifetime = TimeSpan.FromMinutes(30),
EnableMultipleHttp2Connections = true
})
{
DefaultRequestVersion = HttpVersion.Version20 // Fallback to HTTP/2 for compatibility
};
private static readonly JsonSerializerOptions JsonOptions = new()
{
PropertyNamingPolicy = JsonNamingPolicy.CamelCase
};

public ClaudeAIService()
{
if (!HttpClient.DefaultRequestHeaders.Contains("x-api-key"))
{
HttpClient.DefaultRequestHeaders.Clear();
HttpClient.DefaultRequestHeaders.Add("x-api-key", _apiKey);
HttpClient.DefaultRequestHeaders.Add("anthropic-version", "2023-06-01"); // Check latest version in Claude API docs
}
}

public async Task<string> CompleteAsync(List<ChatMessage> chatMessages)
{
var requestBody = new ClaudeChatRequest
{
Model = _modelName,
Max_tokens = 1000, // Maximum tokens in response
Messages = chatMessages.Select(m => new ClaudeMessage
{
Role = m.Role == ChatRole.User ? "user" : "assistant",
Content = m.Text
}).ToList(),
Stop_sequences = new List<string> { "END_INSERTION", "NEED_INFO", "END_RESPONSE" } // Configurable stop sequences
};

var content = new StringContent(JsonSerializer.Serialize(requestBody, JsonOptions), Encoding.UTF8, "application/json");

try
{
var response = await HttpClient.PostAsync(_endpoint, content);
response.EnsureSuccessStatusCode();
var responseString = await response.Content.ReadAsStringAsync();
var responseObject = JsonSerializer.Deserialize<ClaudeChatResponse>(responseString, JsonOptions);
return responseObject?.Content?.FirstOrDefault()?.Text ?? "No response from Claude model.";
}
catch (Exception ex) when (ex is HttpRequestException || ex is JsonException)
{
throw new InvalidOperationException("Failed to communicate with Claude API.", ex);
}
}
}

{% endhighlight %}
{% endtabs %}

## Implement IChatInferenceService

Create `ClaudeInferenceService.cs`:

{% tabs %}
{% highlight c# tabtitle="ClaudeInferenceService.cs" %}

using Syncfusion.UI.Xaml.SmartComponents;

public class ClaudeInferenceService : IChatInferenceService
{
private readonly ClaudeAIService _claudeService;

public ClaudeInferenceService(ClaudeAIService claudeService)
{
_claudeService = claudeService;
}

public async Task<string> GenerateResponseAsync(List<ChatMessage> chatMessages)
{
return await _claudeService.CompleteAsync(chatMessages);
}
}

{% endhighlight %}
{% endtabs %}

## Register Services in WPF

Update `App.xaml.cs`:

{% tabs %}
{% highlight c# tabtitle="App.xaml.cs" hl_lines="9 10" %}

using Syncfusion.UI.Xaml.SmartComponents;

SyncfusionAIExtension.Services.AddSingleton<ClaudeAIService>();
SyncfusionAIExtension.Services.AddSingleton<IChatInferenceService, ClaudeInferenceService>();


{% endhighlight %}
{% endtabs %}
Loading