Search text from textbox using dialog in Silverlight - silverlight

I have reachtextbox and want to search text like notepad in silverlight in separate dialog.. Find text and search that text in huge text entered in richtextbox.
How can I do it using separate dialog like notepad and search text and edit and highlight it in richtextbox?

I'd use a Mediator to send messages between search form and text form. You can declare an event like "OnSearch" in your search form and suscribe to it from your text form. When the event raises, you should send an eventarg with the string you want to search.
The text form should suscribe to the "searchMessage" with a string parameter. The Business layer for text form should implement a "search" method that looks for every string/substring depending on your search options. Then change text color for each coincidence.
Searching strings:
http://msdn.microsoft.com/en-us/library/ms228630(v=vs.80).aspx
You can also use the Find method in RichTextBox.
To change the color of that text you have to set the text as selected and then change the color of that selection:
SelectionStart, SelectionLenght, SelectionColor.

Related

how to add react clickable button element as text input along with free text in draftjs?

im aiming for a rich text input text component that enable user to type free text but also can insert tag/button-like element to the text box whenever user select something from select dialog similar to multiple selection interaction. think textarea combined with this.
i have tried to create my own contenteditable element, but its painful, i got issues in selection/caret position etc. so im wondering is it possible to do this in draftjs?

How to 'preselect' text in a TextField so that typing something new immediately replaces the previous text?

It is common practice in many UI situations to preselect the text displayed in a text editing field in such a way that if the user starts typing it immediately replaces the displayed text.
This can be useful for example in search field to show the previously searched text (for reuse or editing) while making it easy to search for a new text string simply by start typing.
I've searched for how to do this in TextField, but not found a way yet - is it possible?
We don't have a concept of pre-select and it isn't common in mobile where selection is awkward by comparison. A more common approach here is to have an X button next to the text field which clears the text field instantly. You can easily do it by just adding a button next to the field.

Creating select event on text component and creating custom view upon text

My aim is create custom event on Text Component. When I choose one word or when I highlight couple of words, event should fire to open a "buble view" upon, below or near that specific text.
I have found this package here react-native-selectable-text but it does not provide the functionality that I want.
https://github.com/Astrocoders/react-native-selectable-text
Two steps
1) How to create that selectable action. I am not talking about Text prop selectable which only opens a menu of copy, paste, select all options. I want to open a view like that menu. A view which will contain information about highlighted text.
2) How I can render a small box(View comp.) with specific coordinates. Like when I choose that text, box has to be rendered upon or below of the text.
I know direct manipulation. But hard part is how am I going to give that select&highlight action to text component?

How to implement textinput control and identification

I have a text input box where users can add text, however I would like my program to identify the text in the box and match it up with text in a database.
So the user essentially can't add any text which isn't on the database. So the user will type in the text input box and maybe like a quick selection box appears below it to identify what is being added based on the items on the database.
Not sure where to start implementing this.
Textboxes are just normal textinput components at the moment:
<s:TextInput id="searchInput3" includeIn="AddingInput3" x="126" y="304"change="onChange3(event)"/>
Database is just a local xml file
Looks like you meant auto completion in your text input.
You must search for this in your favorite search engine: "flex text input auto complete" and you should get many results.
One such example for the same is:
http://www.packtpub.com/article/building-a-flex-type-ahead-text-input

Visual Studio Extension: Pass Selected Text to WPF Window

I've got a basic extension that - highlights text (currently an xml open tag ) and provides a context menu button which will open a WPF form. What I'd love is an easy way to pass the content of ... to the form when the button is clicked (and back from the form later). What would be fine as well is doing the same with selected text (select the text, hit the button on the context menu...). The thing is, I can't find a reasonably easy way to pass text (selected or processed) to the form from the editor window to the form.
Is there an easy way to do this?

Resources