Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOCINFRA-2341_merged_using_automation #1615

Open
wants to merge 101 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
f270d01
Merge pull request #1565 from Syncfusion-Content/hotfix/hotfix-v27.2.2
SyncfusionBuild Nov 20, 2024
fea7514
Merge pull request #1566 from Syncfusion-Content/hotfix/hotfix-v27.2.2
SyncfusionBuild Nov 21, 2024
283af0d
Merge pull request #1570 from Syncfusion-Content/hotfix/hotfix-v27.2.2
SyncfusionBuild Nov 22, 2024
df7da42
Merge pull request #1571 from Syncfusion-Content/hotfix/hotfix-v27.2.2
SyncfusionBuild Nov 25, 2024
ae5e36a
Merge pull request #1579 from Syncfusion-Content/hotfix/hotfix-v27.2.2
SyncfusionBuild Nov 29, 2024
6ef5d48
Merge pull request #1582 from Syncfusion-Content/hotfix/hotfix-v27.2.2
SyncfusionBuild Dec 2, 2024
cf37186
Merge pull request #1587 from Syncfusion-Content/hotfix/hotfix-v27.2.2
SyncfusionBuild Dec 4, 2024
00ad960
Merge pull request #1597 from Syncfusion-Content/development
SyncfusionBuild Dec 11, 2024
a2b294a
Added Trademark Symbols
SabarieswaranSF4791 Dec 12, 2024
7b11f6f
UG documentation for AIAssistView control.
Ganesh-Mariappan Dec 12, 2024
60f81e7
Merge pull request #1602 from syncfusion-content/assistview-master
JeganRavichandran Dec 12, 2024
aab76d2
Resolved CI Issue
SabarieswaranSF4791 Dec 12, 2024
c2a48b0
changed platform name for CI Issue
SabarieswaranSF4791 Dec 12, 2024
c52262c
Merge pull request #1601 from syncfusion-content/EXT-Add-Trademark-Sy…
GanesanRengasamy Dec 12, 2024
3524e35
WPF-925464-SymbolGroupViewModel UG Revamp HotFix
SatishRaj4377 Dec 13, 2024
076f3bf
WPF-925462-Stencil And SymbolGroup Save Load Content HotFix
SatishRaj4377 Dec 13, 2024
fe293ac
Merge pull request #1604 from syncfusion-content/WPF-925462-Stencil_A…
KarkuvelRajan Dec 13, 2024
f6b1e70
Merge pull request #1603 from syncfusion-content/WPF-925464-SymbolGro…
KarkuvelRajan Dec 13, 2024
ace0131
Updated Getting-Started.md
Nithi-22 Dec 13, 2024
4734266
WPF-925465-Added Note In Themes
SatishRaj4377 Dec 13, 2024
d512942
WPF-925465-Fixed image not visible issue
SatishRaj4377 Dec 13, 2024
b231b54
WPF-925465-Highlighted the ShapeStyle property
SatishRaj4377 Dec 13, 2024
2b718cd
WPF-925465-corrected the hashtags for title in stencil serialization …
SatishRaj4377 Dec 13, 2024
3f9750b
Updated the images for the AIAssistView UG documentation.
Ganesh-Mariappan Dec 13, 2024
8dc386b
Merge pull request #1608 from syncfusion-content/WPF-925465-Added_Not…
KarkuvelRajan Dec 13, 2024
e0b9c2c
Merge pull request #1609 from syncfusion-content/ug-aiassistview
JeganRavichandran Dec 13, 2024
77d198d
925962 - [hotfix] Update UG for WPF Maps Marker template selector fea…
sanjayvikramsf4373 Dec 13, 2024
96463cd
Merge branch 'hotfix/hotfix-v28.1.33' of https://github.com/syncfusio…
Nithi-22 Dec 14, 2024
cb20cbf
925962 - Update the Accessibility support for WPF TreeMap UG documen…
sanjayvikramsf4373 Dec 14, 2024
726a153
Merge pull request #1613 from syncfusion-content/925962-UpdateTreemapUG
Jeyasri-Murugan Dec 14, 2024
0f14059
925962 - [hotfix] Update the Text setting document in WPF Image Editor.
sanjayvikramsf4373 Dec 16, 2024
fe88ef3
925962 - Update Images.
sanjayvikramsf4373 Dec 16, 2024
866b558
WPF-924506-Trademark_Symbol_Inclusion_WPF
SatishRaj4377 Nov 28, 2024
d751d4c
WPF-924506-Updated Syncfusion®
SatishRaj4377 Nov 29, 2024
2e377e6
WPF-924506-Updated Syncfusion® in HeatMap
SatishRaj4377 Nov 29, 2024
980c940
WPF-924506-Updated Essential® in HeatMap
SatishRaj4377 Nov 29, 2024
1bb3659
WPF-924506-File missing in TOC error fix
SatishRaj4377 Dec 5, 2024
97d14b8
WPF-924506-Udpated the Image file path to fix CI errors (image missin…
SatishRaj4377 Dec 5, 2024
792939a
Merge pull request #1576 from syncfusion-content/WPF-924506-Trademark…
KarkuvelRajan Dec 16, 2024
fe64805
925962 - Update Review Correction.
sanjayvikramsf4373 Dec 16, 2024
04f89ea
Merge pull request #1616 from syncfusion-content/925962-UpadteImageEd…
Jeyasri-Murugan Dec 16, 2024
fdaf752
WPF-924506-Removed Collision-State File and Updated trademark
SatishRaj4377 Dec 16, 2024
a22a712
Merge pull request #1617 from syncfusion-content/WPF-924506-Remove_Co…
KarkuvelRajan Dec 16, 2024
3e7937f
925962- Update text settings image.
sanjayvikramsf4373 Dec 16, 2024
a29fe70
Update Text.md
sanjayvikramsf4373 Dec 16, 2024
f06a9c5
925962- Update API link
sanjayvikramsf4373 Dec 16, 2024
3a9c229
925962 - Update month view document in scheduler.
sanjayvikramsf4373 Dec 16, 2024
d1905be
Update Month-View.md
sanjayvikramsf4373 Dec 16, 2024
a4f21ab
Updated API links added for scheduler.
Karthickmani97 Dec 16, 2024
8fce94f
Merge pull request #1620 from syncfusion-content/925962-UpadteImageEd…
Karthickmani97 Dec 16, 2024
37abe34
Merge pull request #1612 from syncfusion-content/925962-UpdateUGWPFMaps
Karthickmani97 Dec 16, 2024
6ac3847
925962 - Update WPF Maps Example code alignment issue.
sanjayvikramsf4373 Dec 18, 2024
574d893
Merge pull request #1622 from syncfusion-content/925962-MapsAllignmen…
Karthickmani97 Dec 18, 2024
f56f53c
Added the release notes MD file and corresponding node entry in the T…
DeepakRajSundar Dec 18, 2024
e1e667b
Added the Trademark Symbol in md files
KrithikaGanesan Dec 19, 2024
35798c5
Added the Trademark Symbol in md files
KrithikaGanesan Dec 19, 2024
dba89e7
Added the Trademark Symbol in md files
KrithikaGanesan Dec 19, 2024
1ea5b84
Added the Trademark Symbol in md files
KrithikaGanesan Dec 19, 2024
5080203
Added the Trademark Symbol in md files
KrithikaGanesan Dec 19, 2024
ca2d3d0
Added the Trademark Symbol in md files
KrithikaGanesan Dec 19, 2024
f320e95
Updated.
Ganesh-Mariappan Dec 19, 2024
5d63120
Added the Trademark Symbol in md files
KrithikaGanesan Dec 19, 2024
4f06d4c
Added the Trademark Symbol in md files
KrithikaGanesan Dec 19, 2024
54cc7bd
Added the Trademark Symbol in md files
KrithikaGanesan Dec 19, 2024
9676274
Added the Trademark Symbol in md files
KrithikaGanesan Dec 19, 2024
740c3b4
Added the Trademark Symbol in md files
KrithikaGanesan Dec 19, 2024
1bc5cc0
Added the release notes MD file and corresponding node entry in the T…
DeepakRajSundar Dec 19, 2024
9fcb5ec
Updated
Ganesh-Mariappan Dec 20, 2024
19eff52
Added the Trademark Symbol in md files
KrithikaGanesan Dec 20, 2024
46cb439
Added the Trademark Symbol in md files
KrithikaGanesan Dec 20, 2024
1da61c1
925962- Update the Image Editor Text Settings content.
sanjayvikramsf4373 Dec 20, 2024
3264770
925962 - Update review corrections.
sanjayvikramsf4373 Dec 23, 2024
632a910
925962 - Update Gantt Example codes.
sanjayvikramsf4373 Dec 23, 2024
3b82f73
Update Gantt Control Data binding document.
sanjayvikramsf4373 Dec 23, 2024
8613451
Update Example code
sanjayvikramsf4373 Dec 23, 2024
4fd80fa
Update data-binding.md
sanjayvikramsf4373 Dec 23, 2024
27ee03c
925962 - Update Gantt data binding document
sanjayvikramsf4373 Dec 23, 2024
c841b8e
Update data-binding.md
sanjayvikramsf4373 Dec 23, 2024
4b1fa1e
Added the release notes MD file and corresponding node entry in the T…
DeepakRajSundar Dec 23, 2024
2decab1
Merge pull request #1629 from syncfusion-content/925962-UpdateImageEd…
Karthickmani97 Dec 23, 2024
0d1ecaf
Updated
Nithi-22 Dec 23, 2024
1fd5840
updated
Nithi-22 Dec 23, 2024
7dfdbf8
Added the Trademark Symbol in md files
KrithikaGanesan Dec 26, 2024
aed6220
Merge branch 'hotfix/hotfix-v28.1.33' of https://github.com/syncfusio…
KrithikaGanesan Dec 26, 2024
d416ff5
Added the Trademark Symbol in md files
KrithikaGanesan Dec 26, 2024
c87e933
Updated code
Nithi-22 Dec 26, 2024
e512349
updated
Nithi-22 Dec 26, 2024
7a1584c
Update Getting-Started.md
Manivannan-E Dec 26, 2024
03916b6
updated
Nithi-22 Dec 26, 2024
85fbe10
Updated
Nithi-22 Dec 26, 2024
0a5a2bf
Changed the image in button control for icon template selector.
Manivannan-E Dec 27, 2024
41aec75
Merge pull request #1607 from syncfusion-content/Need-to-correct-the-…
Manivannan-E Dec 27, 2024
de3efc1
Merge pull request #1626 from syncfusion-content/trade
RajaVigneshB Dec 27, 2024
c660524
Added the release notes MD file and corresponding node entry in the T…
DeepakRajSundar Dec 30, 2024
617bbff
Added the release notes MD file and corresponding node entry in the T…
DeepakRajSundar Jan 6, 2025
3bc5723
update trademark symbol
tineshkumarsf4652 Jan 6, 2025
40f8eb6
revert the toc file
tineshkumarsf4652 Jan 6, 2025
e480c88
revert the toc file
tineshkumarsf4652 Jan 6, 2025
3c78451
Merge pull request #1634 from syncfusion-content/Update_Trademark_Symbol
Saravanan-Madhesh Jan 10, 2025
8145952
Added the release notes MD file and corresponding node entry in the T…
DeepakRajSundar Jan 13, 2025
07dc85a
Merge pull request #1628 from syncfusion-content/assistview-wpf
Manivannan-E Jan 15, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 13 additions & 1 deletion wpf-toc.html

Large diffs are not rendered by default.

176 changes: 176 additions & 0 deletions wpf/AI-AssistView/Getting-Started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
---
layout: post
title: Getting Started with WPF AI AssistView control | Syncfusion
description: Learn about getting started with the Syncfusion WPF AI AssistView (SfAIAssistView) control with its basic features.
platform: wpf
control: AI AssistView
documentation: ug
---

# Getting Started with WPF AI AssistView

This section explains the steps required to add the Wpf [SfAIAssistView](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Chat.SfAIAssistView.html) control with its basic features.

## Structure of SfAIAssistView

![WPF SfAIAssistView Structure](aiassistview_images/wpf_aiassistview_control_structure.png)

## Adding WPF SfAIAssistview via xaml

1. Create a [Wpf desktop app for C# and .NET 6](https://learn.microsoft.com/en-us/dotnet/desktop/wpf/get-started/create-app-visual-studio?view=netdesktop-9.0).
2. Add reference to [Syncfusion.SfChat.Wpf](https://www.nuget.org/packages/Syncfusion.SfChat.Wpf) NuGet.
3. Import the control namespace `Syncfusion.UI.Xaml.Chat` in XAML or C# code.
4. Initialize the [SfAIAssistView](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Chat.SfAIAssistView.html) control.

{% tabs %}
{% highlight xaml %}

<Page
x:Class="GettingStarted.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:GettingStarted"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:syncfusion="using:Syncfusion.UI.Xaml.Chat"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid>
<syncfusion:SfAIAssistView />
</Grid>
</Page>

{% endhighlight %}
{% endtabs %}

## Adding WPF SfAIAssistview via C#

1. Create a [Wpf desktop app for C# and .NET 6](https://learn.microsoft.com/en-us/dotnet/desktop/wpf/get-started/create-app-visual-studio?view=netdesktop-9.0).
2. Add reference to [Syncfusion.SfChat.Wpf](https://www.nuget.org/packages/Syncfusion.SfChat.Wpf) NuGet.
3. Import the control namespace `Syncfusion.UI.Xaml.Chat` in XAML or C# code.
4. Initialize the [SfAIAssistView](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Chat.SfAIAssistView.html) control.

{% tabs %}
{% highlight C# %}

using Syncfusion.UI.Xaml.Chat;

namespace GettingStarted
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
this.InitializeComponent();
// Creating an instance of the AIAssistView control
SfAIAssistView assistView = new SfAIAssistView();
grid.Children.Add(assistView);
}
}
}

{% endhighlight %}
{% endtabs %}


## Creating ViewModel for AI AssistView

Create a simple chat collection as shown in the following code example in a new class file. Save it as ViewModel.cs file.

{% tabs %}
{% highlight C# %}

public class ViewModel : INotifyPropertyChanged
{
private ObservableCollection<object> chats;
private Author currentUser;
public ViewModel()
{
this.Chats = new ObservableCollection<object>();
this.CurrentUser = new Author { Name="John"};
this.GenerateMessages();
}

private async void GenerateMessages()
{
this.Chats.Add( new TextMessage { Author = CurrentUser, Text = "What is WPF?" } );
await Task.Delay(1000);
this.Chats.Add( new TextMessage { Author = new Author { Name = "Bot" }, Text = "WPF is a user interface layer that contains modern controls and styles for building Windows apps." });
}

public ObservableCollection<object> Chats
{
get
{
return this.chats;
}
set
{
this.chats = value;
RaisePropertyChanged("Messages");
}
}

public Author CurrentUser
{
get
{
return this.currentUser;
}
set
{
this.currentUser = value;
RaisePropertyChanged("CurrentUser");
}
}


public void RaisePropertyChanged(string propName)
{
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(propName));
}
}


public event PropertyChangedEventHandler PropertyChanged;
}

{% endhighlight %}
{% endtabs %}

## Bind Messages

Set the ViewModel as the DataContext for the AI AssistView or the parent window. This allows data binding between the UI and the ViewModel properties.
To populate AI AssistView, bind the chats in ViewModel to Messages property of AI AssistView.

{% tabs %}
{% highlight xaml %}

<Page
x:Class="GettingStarted.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:GettingStarted"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:syncfusion="using:Syncfusion.UI.Xaml.Chat"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid>
<Grid.DataContext>
<local:ViewModel/>
</Grid.DataContext>
<syncfusion:SfAIAssistView CurrentUser="{Binding CurrentUser}"
Messages="{Binding Chats}"/>
</Grid>
</Page>

{% endhighlight %}
{% endtabs %}

![WPF AI AssistView control getting started](aiassistview_images/wpf_aiassistview_gettingstarted.png)
211 changes: 211 additions & 0 deletions wpf/AI-AssistView/Open-AI.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,211 @@
---
layout: post
title: TypingIndicator in WPF AI AssistView control | Syncfusion
description: Learn about how to connect the AI AssistView control with OpenAI and chat gpt conversation experience.
platform: wpf
control: SfAIAssistView
documentation: ug
---

# OpenAI connection for AI AssistView

This section explains about how to connect the AI AssistView with OpenAI.

## Creating an application with NuGet reference.

1. Create a [Wpf desktop app for C# and .NET 6](https://learn.microsoft.com/en-us/dotnet/desktop/wpf/get-started/create-app-visual-studio?view=netdesktop-9.0).
2. Add reference to [Syncfusion.SfChat.Wpf](https://www.nuget.org/packages/Syncfusion.SfChat.Wpf) NuGet.
3. Import the control namespace `Syncfusion.UI.Xaml.Chat` in XAML or C# code.
4. Initialize the [SfAIAssistView](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Chat.SfAIAssistView.html) control.
5. Add reference to [Microsoft Semantic NuGet](https://www.nuget.org/packages/Microsoft.SemanticKernel) NuGet.

## Creating the OpenAI view model class.

To connect with OpenAI, we need the following details.
* OPENAI_KEY: A string variable where we should add our valid OpenAI API key.
* OPENAI_MODEL: A string variable representing the OpenAI language model we want to use.
* API_ENDPOINT: A string variable representing the URL endpoint of the OpenAI API.

{% tabs %}
{% highlight C# %}

public class ViewModel : INotifyPropertyChanged
{
AIAssistChatService service;

private ObservableCollection<object> chats;
public ObservableCollection<object> Chats
{
get
{
return this.chats;
}
set
{
this.chats = value;
RaisePropertyChanged("Messages");
}
}
public DataTemplate AIIcon { get; set; }
private ObservableCollection<string> suggestion;

public void RaisePropertyChanged(string propName)
{
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(propName));
}
}

public event PropertyChangedEventHandler PropertyChanged;

private Author currentUser;
public Author CurrentUser
{
get
{
return this.currentUser;
}
set
{
this.currentUser = value;
RaisePropertyChanged("CurrentUser");
}
}

private bool showTypingIndicator;
public bool ShowTypingIndicator
{
get
{
return this.showTypingIndicator;
}
set
{
this.showTypingIndicator = value;
RaisePropertyChanged("ShowTypingIndicator");
}
}

public ObservableCollection<string> Suggestion
{
get
{
return this.suggestion;
}
set
{
this.suggestion = value;
RaisePropertyChanged("Suggestion");
}
}

private TypingIndicator typingIndicator;
public TypingIndicator TypingIndicator
{
get
{
return this.typingIndicator;
}
set
{
this.typingIndicator = value;
RaisePropertyChanged("TypingIndicator");
}
}

public ViewModel()
{
this.Chats = new ObservableCollection<object>();
this.Chats.CollectionChanged += Chats_CollectionChanged;
this.CurrentUser = new Author() { Name = "User" };
this.TypingIndicator = new TypingIndicator() { Author = new Author { ContentTemplate = AIIcon } };
service = new AIAssistChatService();
service.Initialize();

}

private async void Chats_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
{
var item = e.NewItems?[0] as ITextMessage;
if (item != null)
{
if (item.Author.Name == currentUser.Name)
{
ShowTypingIndicator = true;
await service.NonStreamingChat(item.Text);
Chats.Add(new TextMessage
{
Author = new Author { Name = "Bot", ContentTemplate = AIIcon },
DateTime = DateTime.Now,
Text = service.Response
});
ShowTypingIndicator = false;
}
}
}

public class AIAssistChatService
{
IChatCompletionService gpt;
Kernel kernel;
private string OPENAI_KEY = "";// Add a valid OpenAI key here.

private string OPENAI_MODEL = "gpt-4o-mini";

private string API_ENDPOINT = "https://openai.azure.com";

public string Response { get; set; }
public async Task Initialize()
{
var builder = Kernel.CreateBuilder().AddAzureOpenAIChatCompletion(
OPENAI_MODEL, API_ENDPOINT, OPENAI_KEY);

kernel = builder.Build();
gpt = kernel.GetRequiredService<IChatCompletionService>();
}
public async Task NonStreamingChat(string line)
{
Response = string.Empty;
var response = await gpt.GetChatMessageContentAsync(line);
Response = response.ToString();
}
}
}

{% endhighlight %}
{% endtabs %}

## Bind Messages

Set the ViewModel as the DataContext for the AI AssistView or the parent window. This allows data binding between the UI and the ViewModel properties.

{% tabs %}
{% highlight xaml %}

<Page
x:Class="GettingStarted.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:GettingStarted"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:syncfusion="using:Syncfusion.UI.Xaml.Chat"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid>
<Grid.DataContext>
<local:ViewModel/>
</Grid.DataContext>
<syncfusion:SfAIAssistView CurrentUser="{Binding CurrentUser}"
Suggestions="{Binding Suggestion}"
ShowTypingIndicator="True"
TypingIndicator="{Binding TypingIndicator}"
Messages="{Binding Chats}"/>
</Grid>
</Page>

{% endhighlight %}
{% endtabs %}

![WPF AI AssistView control open ai](aiassistview_images/wpf_aiassistview_openai.gif)
Loading