Skip to content

Commit e03513c

Browse files
Merge pull request #155 from syncfusion-content/XAMARINANDROID-3913-Update-Code-Changes-In-SfAutoComplete
XAMARINANDROID-3913 : In AutoComplete, Update Code Changes For First Occurrence
2 parents bba953a + 52364fa commit e03513c

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed
Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
---
22
layout : post
3-
title : MatchHighlighting in Syncfusion SfAutoComplete control for Xamarin.Android
4-
description : Learn how to highlight the matched text in SfAutoComplete
3+
title: MatchHighlighting text in Syncfusion SfAutoComplete control.
4+
description: Learn on how to highlight the matched text in SfAutoComplete for Xamarin.Android and also understood the highlight the matching characters in suggestion list
55
platform : Xamarin.Android
66
control : SfAutoComplete
77
documentation : ug
88
---
99

10+
{% banner %}
11+
12+
{:.gradient_m}
13+
14+
{% col_2_equal %}
15+
1016
# Highlighting matched text
1117

1218
Highlight matching characters in a suggestion list to pick an item with more clarity. There are two ways to highlight the matching text:
@@ -20,7 +26,7 @@ The text highlight can be indicated with various customizing styles by enabling
2026

2127
* HighlightedTextColor - sets the color of the highlighted text for differentiating the highlighted characters.
2228

23-
* HighlightedTextFontAttributes - sets the FontAttributes of the highlighted text.
29+
* HighlightedTextFontTypeFace - sets the FontAttributes of the highlighted text.
2430

2531
## First Occurrence
2632

@@ -30,19 +36,19 @@ It highlights the first position of the matching characters in the suggestion li
3036

3137
{% highlight C# %}
3238

33-
countryAutoComplete.SuggestionMode=SuggestionMode.StartsWith;
34-
countryAutoComplete.TextHighlightMode=OccurrenceMode.FirstOccurrence;
35-
countryNameAutoComplete.HighlightedTextColor = Color.Red;
36-
countryNameAutoComplete.HighlightedTextFontAttributes = HighlightedTextFontAttributes.Bold;
39+
countryAutoComplete.SuggestionMode = SuggestionMode.StartsWith;
40+
countryAutoComplete.TextHighlightMode = OccurrenceMode.FirstOccurrence;
41+
countryAutoComplete.HighlightedTextColor = Color.Blue;
42+
countryAutoComplete.HighlightedTextFontTypeFace = TypefaceStyle.Bold;
3743

3844
{% endhighlight %}
3945

4046
{% endtabs %}
4147

4248
N> The default Color of HighlightedTextColor is Red.
43-
The default FontAttribute of HighlightedTextFontAttributes is None.
49+
The default FontAttribute of HighlightedTextFontTypeFace is None.
4450

45-
![](images/FirstOccurrence.png)
51+
![First Occurrence AutoComplete Image](images/FirstOccurrence.png)
4652

4753
## Multiple Occurrence
4854

@@ -52,16 +58,16 @@ It highlights the matching character that are present everywhere in the suggesti
5258

5359
{% highlight C# %}
5460

55-
countryAutoComplete.SuggestionMode=SuggestionMode.Contains;
56-
countryAutoComplete.TextHighlightMode=OccurrenceMode.MultipleOccurrence;
61+
countryAutoComplete.SuggestionMode = SuggestionMode.Contains;
62+
countryAutoComplete.TextHighlightMode = OccurrenceMode.MultipleOccurrence;
5763
countryNameAutoComplete.HighlightedTextColor = Color.Red;
58-
countryNameAutoComplete.HighlightedTextFontAttributes = HighlightedTextFontAttributes.Bold;
64+
countryNameAutoComplete.HighlightedTextFontTypeFace = TypefaceStyle.Bold;
5965

6066
{% endhighlight %}
6167

6268
{% endtabs %}
6369

64-
![](images/MultipleOccurrence.png)
70+
![Multiple Occurrence AutoComplete Image](images/MultipleOccurrence.png)
6571

6672

6773

0 commit comments

Comments
 (0)