We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Highlighting text programmatically

Thread ID:

Created:

Updated:

Platform:

Replies:

121237 Nov 21,2015 12:06 AM UTC Nov 24,2015 10:08 AM UTC WPF 3
loading
Tags: EditControl
Alessandro Del Sole
Asked On November 21, 2015 12:06 AM UTC

Hi,
suppose I want to search all the occurrences of a word or literal in source code text displayed in the EditControl, and say I want to highlight all the occurrences e.g. in yellow. Is there a way to accomplish this?

Thanks in advance,
Alessandro

Priyanga Balasubramaniam [Syncfusion]
Replied On November 23, 2015 11:32 AM UTC

Hi Alessandro,

Thank you for using Syncfusion products.

We have analyzed your requirement for "Highlighting text while search all occurrences in the EditControl". The highlight feature is not available in our product, but we can search the text using “Find and Replace DialogWindow”. We have also prepared a sample. In this sample, while searching all the occurrences of word or literal in the EditControl it displays all occurrences with line number in the "Find Symbol Results" box. You can refer all occurrences of text or literal from here.

Please download the sample from the below location.

Sample: EditControlSample

Regards,
Priyanga B

Alessandro Del Sole
Replied On November 23, 2015 05:24 PM UTC

First, thanks for your reply and for your time in preparing an example. However, I think the example is incomplete as I just see the text editor populated with the SQL code in the code-behind file but no other features are available.

Thanks again.

Priyanga Balasubramaniam [Syncfusion]
Replied On November 24, 2015 10:08 AM UTC

Hi Alessandro,

We have attached a sample. In this sample you can view "Find and Replace DialogWindow" by choosing "Find and Replace" MenuItem in Edit Menu. Also you can view "Find and Replace DialogWindow" by Pressing Ctrl + F.

Choose "Find Symbol" option in top most combobox in "Find and Replace DialogWindow". Type the text or literal in "Find what" editable combobox and click the "Find All" button. Now all occurrences of the text or literal displayed in the "Find Symbol Results" box with line number.

Please download the sample from the below location.

Sample: EditControlSample

Regards,
Priyanga B

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;