Skip to content

Commit f2b9aa3

Browse files
committed
address comments from tech writers.
1 parent cb12a64 commit f2b9aa3

9 files changed

+116
-50
lines changed

ai/copilot-extension.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ To use the Telerik MAUI Copilot extension:
5454

5555
The following examples demonstrate useful prompts for the Telerik MAUI extension:
5656

57-
* "`@telerikmaui` Generate a DataGrid with 5 columns and 500 records. Enable sorting for the firs column and include paging."
57+
* "`@telerikmaui` Generate a DataGrid with 5 columns and 500 records. Enable sorting for the first column and include paging."
5858
* "`@telerikmaui` Create a Telerik ComboBox with sample data for customers. Enable multiple selection and preselect the first two customers."
5959
* "`@telerikmaui` Show me how to implement a Chart with line series."
6060
* "`@telerikmaui` Generate a CollectionView with grouping and filtering capabilities."

ai/overview.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,25 +41,28 @@ To use the Telerik MAUI AI Coding Assistant, you need:
4141
Consider the following recommendations when working with the AI Coding Assistant:
4242

4343
* Add NuGet packages/referenced assemblies for the Telerik UI for WPF product.
44-
* Set the .sln as a context.
44+
* Set the `.sln` as a context.
4545
* When switching between tasks and files, start a new session in a new chat window to avoid polluting the context with irrelevant or outdated information.
4646
* At the time of publishing, Claude Sonnet 4 produces optimal results.
4747

4848
## Usage Limits
4949

5050
Access to the AI Coding Assistant depends on your [Telerik license type](https://www.telerik.com/purchase/faq/licensing-purchasing):
5151

52-
Subscription License:
52+
### Subscription License
53+
5354
* A Subscription is the primary license that grants full access to the AI Coding Assistant.
5455
* Includes a virtually unlimited number of requests, with a fair use threshold of 300 requests per day.
5556
* Best for ongoing and high-volume usage.
5657

57-
Perpetual License (Limited Access):
58+
### Perpetual License (Limited Access)
59+
5860
* Perpetual licenses include limited access of 50 requests per year.
5961
* Intended for exploring and trying out the AI Coding Assistant.
6062
* For continued or higher-volume access, upgrade to a Subscription license.
6163

62-
Trial License:
64+
### Trial License
65+
6366
* Trial licenses include 300 requests per trial per year.
6467
* Reactivating the same trial for a new release does not grant additional requests.
6568
* Designed for evaluating the feature before purchasing.

ai/prompt-library.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ This section provides examples of general questions related to Telerik UI for MA
3737

3838
<table>
3939
<tr>
40-
<th>Setup New Project and Add DataGrid control</th>
40+
<th>Set Up New Project and Add DataGrid control</th>
4141
<th>Component Overview</th>
4242
</tr>
4343
<tr>

controls/tabview/styling/header-itemstyle-selector.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ position: 3
1111

1212
The TabView control provides the built-in `HeaderItemStyleSelector` property, which allows you to apply different styles to each TabView header item. The target type of the style must be `TabViewHeaderItem`.
1313

14-
The following example shows how to apply styles to the TabView heare using a style selector.
14+
The following example shows how to apply styles to the TabView by using a style selector.
1515

1616
**1.** Define the TabView control:
1717

controls/treedatagrid/methods.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The [Telerik UI for .NET MAUI TreeDataGrid]({%slug datagrid-overview%}) exposes
1414
* `Expand`(`object item`)&mdash;Expands the children of the item.
1515
* `Collapse`(`object item`)&mdash;Collapses the children of the item.
1616

17-
Use the `IsExpanded` (`bool`) property to get a value whether the item is currently expanded (has its children visible).
17+
Use the `IsExpanded` (`object item`) method to get a value whether the item is currently expanded (has its children visible). Returns `true` if the item is expanded, otherwise `false`.
1818

1919
## Additional Resources
2020

knowledge-base/datagrid-sorting-grouping-descending-order.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,20 @@ res_type: kb
1717

1818
## Description
1919

20-
I need when the user groups the DataGrid through the U, the groups to appear in descending order. Currently, the items are sorted by `FirstContactDate` in descending order, but when grouped, the grouping defaults to ascending order. The goal is to allow users to see the latest entries grouped by `FirstContactDate` in descending order.
20+
When the user groups the DataGrid through the UI, I need the groups to appear in descending order. Currently, the items are sorted by `FirstContactDate` in descending order, but when grouped, the grouping defaults to ascending order. The goal is to allow users to see the latest entries grouped by `FirstContactDate` in descending order.
2121

2222
This knowledge base article also answers the following questions:
2323
- How to sort and group items in descending order in DataGrid?
2424
- How to set group descriptors to descending order in Telerik DataGrid for .NET MAUI?
25-
- How to change group descriptor order dynamically during grouping?
25+
- How to change the group descriptor order dynamically during grouping?
2626

2727
## Solution
2828

29-
To achieve sorting and grouping in descending order, follow one of the approaches below:
29+
To achieve sorting and grouping in descending order, follow one of the approaches below.
3030

3131
### Option 1: Set Sort and Group Descriptors Explicitly
3232

33-
Define both `SortDescriptors` and `GroupDescriptors` with the desired `SortOrder` in the XAML configuration:
33+
Define both `SortDescriptors` and `GroupDescriptors` with the desired `SortOrder` in the XAML configuration.
3434

3535
```xaml
3636
<telerik:RadDataGrid.GroupDescriptors>
@@ -44,7 +44,7 @@ Define both `SortDescriptors` and `GroupDescriptors` with the desired `SortOrder
4444

4545
### Option 2: Change Group Sort Order at Runtime
4646

47-
Use the `GroupDescriptors.CollectionChanged` event to dynamically update the `SortOrder` of the group descriptor when a column is grouped. Example:
47+
Use the `GroupDescriptors.CollectionChanged` event to dynamically update the `SortOrder` of the group descriptor when a column is grouped. For example:
4848

4949
```csharp
5050
public partial class MainPage : ContentPage

knowledge-base/display-showmoretemplate-hide-tokentemplate-combobox-net-maui.md

Lines changed: 95 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ res_type: kb
1010

1111
| Version | Product | Author |
1212
| --- | --- | ---- |
13-
| 6.7.0 | Telerik UI for .NET MAUI ComboBox | [Dobrinka Yordanova](https://www.telerik.com/blogs/author/dobrinka-yordanova)|
13+
| 11.1.0 | Telerik UI for .NET MAUI ComboBox | [Dobrinka Yordanova](https://www.telerik.com/blogs/author/dobrinka-yordanova)|
1414

1515

1616
## Description
@@ -21,76 +21,139 @@ I want to customize the ComboBox control in .NET MAUI to display only the ShowMo
2121

2222
To achieve the desired scenario of hiding the tokens and only displaying the ShowMoreTemplate in the ComboBox control, you can follow these steps:
2323

24-
**1.** Create a custom control.
24+
**1.** Create a custom control `MyComboBox` that inherits from the `RadComboBox`.
2525

26-
**2.** Add a label to display the selected items count.
26+
```C#
27+
public class MyComboBox : RadComboBox
28+
{
29+
30+
}
31+
```
2732

28-
**3.** Update the label's text inside the `SelectionChanged` event.
33+
**2.** Add a label to display the selected items count and update the label's text inside the `MyComboBox.SelectionChanged` event.
2934

3035
```C#
3136
public class MyComboBox : RadComboBox
3237
{
3338
private ContentView selectionToken;
3439
private RadWrapLayout layout;
40+
private bool isInitialized;
41+
3542
public MyComboBox()
3643
{
37-
this.layout = this.Content as RadWrapLayout;
38-
this.SelectionChanged += MyComboBox_SelectionChanged;
44+
this.Loaded += (_, _) => this.Initialize();
45+
}
46+
47+
protected override void OnHandlerChanged()
48+
{
49+
base.OnHandlerChanged();
50+
this.Dispatcher.Dispatch(this.Initialize);
3951
}
4052

41-
private void MyComboBox_SelectionChanged(object? sender, ComboBoxSelectionChangedEventArgs e)
53+
private void Initialize()
4254
{
43-
if (this.SelectedItems.Count > 0)
55+
if (this.isInitialized)
4456
{
45-
if (this.layout.Contains(this.selectionToken))
46-
{
47-
return;
48-
}
57+
return;
58+
}
4959

60+
this.layout = FindDescendant<RadWrapLayout>(this);
61+
if (this.layout == null)
62+
{
63+
return;
64+
}
65+
66+
this.SelectionChanged += this.MyComboBox_SelectionChanged;
67+
this.isInitialized = true;
68+
}
69+
70+
private void MyComboBox_SelectionChanged(object sender, ComboBoxSelectionChangedEventArgs e)
71+
{
72+
if (this.layout == null)
73+
{
74+
return;
75+
}
76+
77+
int count = SelectedItems.Count;
78+
if (count > 0)
79+
{
5080
if (this.selectionToken == null)
5181
{
52-
this.selectionToken = new ContentView();
53-
var label = new Label(); //create a new label for every newly added token
54-
label.SetBinding(Label.TextProperty, new Binding()
82+
var label = new Label
83+
{
84+
VerticalOptions = LayoutOptions.Center,
85+
HorizontalOptions = LayoutOptions.Center
86+
};
87+
label.SetBinding(Label.TextProperty, new Binding("Count")
5588
{
56-
Source = this.SelectedItems,
57-
Path = "Count"
89+
Source = SelectedItems,
90+
StringFormat = "{0} selected"
5891
});
59-
this.selectionToken.Content = label; //set label text to selected items' count
92+
93+
this.selectionToken = new ContentView { Content = label };
6094
}
6195

62-
this.layout.Insert(0, this.selectionToken);
96+
if (!this.layout.Contains(this.selectionToken))
97+
{
98+
this.layout.Insert(0, this.selectionToken);
99+
}
100+
}
101+
else if (this.layout.Contains(this.selectionToken))
102+
{
103+
this.layout.Remove(this.selectionToken);
63104
}
64-
else
105+
}
106+
107+
private static T FindDescendant<T>(Element parent) where T : Element
108+
{
109+
if (parent is T match) return match;
110+
111+
if (parent is IElementController controller)
65112
{
66-
if (layout.Contains(this.selectionToken))
113+
foreach (var child in controller.LogicalChildren)
67114
{
68-
layout.Remove(this.selectionToken);
115+
var result = FindDescendant<T>(child);
116+
if (result != null)
117+
{
118+
return result;
119+
}
69120
}
70121
}
122+
123+
return null!;
71124
}
72125
}
73126
```
74127

75128
**4.** Override the default `TokenTemplate` to hide the tokens.
76129

77130
```xaml
78-
<local:MyComboBox
79-
x:Name="comboBox"
80-
ItemsSource="{Binding Items}"
81-
SelectionMode="Multiple"
82-
IsEditable="True"
83-
DisplayMemberPath="Name"
84-
SelectedItems="{Binding SelectedItems}"
85-
AutomationId="comboSelectedItemMultiple"
86-
WidthRequest="200">
87-
<local:MyComboBox.TokenTemplate>
131+
<local:MyComboBox x:Name="comboBox"
132+
ItemsSource="{Binding Items}"
133+
SelectionMode="Multiple"
134+
IsEditable="True"
135+
DisplayMemberPath="Email"
136+
AutomationId="comboSelectedItemMultiple"
137+
WidthRequest="200">
138+
<local:MyComboBox.TokenTemplate>
88139
<DataTemplate>
89140
<!-- hide the token view -->
90141
<ContentView IsVisible="False">
91142
</ContentView>
92143
</DataTemplate>
93144
</local:MyComboBox.TokenTemplate>
145+
<local:MyComboBox.SelectedItemTemplate>
146+
<DataTemplate>
147+
<telerik:RadBorder>
148+
<VerticalStackLayout>
149+
<Label Text="{Binding Email}"
150+
FontSize="16"
151+
FontAttributes="Bold"
152+
Padding="18, 14"/>
153+
</VerticalStackLayout>
154+
</telerik:RadBorder>
155+
</DataTemplate>
156+
</local:MyComboBox.SelectedItemTemplate>
94157
</local:MyComboBox>
95158
```
96159

knowledge-base/dynamically-update-tabview-headertext-based-on-selection.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ I need to change the `HeaderText` of the TabView items when they are selected. F
2222
This knowledge base article also answers the following questions:
2323
- How can I change the header text of TabView dynamically?
2424
- How to update TabView `HeaderText` based on selection in .NET MAUI?
25-
- How to use ``SelectionChanged` event in TabView to modify `HeaderText`?
25+
- How to use the `SelectionChanged` event in TabView to modify `HeaderText`?
2626

2727
## Solution
2828

29-
Use the [SelectionChanged](https://docs.telerik.com/devtools/maui/controls/tabview/selection#events) event of the TabView to dynamically update the header text based on the selected tab item.
29+
Use the [`SelectionChanged`](https://docs.telerik.com/devtools/maui/controls/tabview/selection#events) event of the TabView to dynamically update the header text based on the selected tab item.
3030

31-
1. Subscribe to the `SelectionChanged` event in the TabView.
31+
**1.** Subscribe to the `SelectionChanged` event in the TabView.
3232

3333
```xaml
3434
<telerik:RadTabView x:Name="tabView"
@@ -40,7 +40,7 @@ Use the [SelectionChanged](https://docs.telerik.com/devtools/maui/controls/tabvi
4040
</telerik:RadTabView>
4141
```
4242

43-
2. Implement a method to update the `HeaderText` dynamically based on the selected index. Handle the `SelectionChanged` event in the code-behind:
43+
**2.** Implement a method to update the `HeaderText` dynamically based on the selected index. Handle the `SelectionChanged` event in the code-behind.
4444

4545
```csharp
4646
private void TabView_SelectionChanged(object sender, EventArgs e)

knowledge-base/speechtotextbutton-language-support.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This article explains how to check the supported languages for the SpeechToTextB
2020

2121
## Solution
2222

23-
Here is an example of how to check the supported languages for the SpeechToTextButton in .NET MAUI. For the demo, we will use:
23+
Here is an example of how to check the supported languages for the SpeechToTextButton in .NET MAUI. For the demo, use:
2424
* An Editor for displaying the recognized text.
2525
* An Entry for setting the language.
2626
* A Label for displaying whether the language is supported or not.

0 commit comments

Comments
 (0)