Northwoods.GoXam.Tool Namespace > TextEditingTool Class : DoActivate Method |
If TextBlock is not already specified, this looks for one at the current mouse point. If none is found, this method does nothing.
This method then creates an Northwoods.GoXam.Adornment using the Northwoods.GoXam.Part.GetTextEditAdornmentTemplate, or a default data template that displays a TextBox
. The adornment is remembered as the EditorAdornment property.
Then this method finds an ITextEditor to manage the EditorAdornment. If the root visual element of the adornment template implements ITextEditor, it uses that. Otherwise it uses Northwoods.GoXam.Part.GetTextEditor on the TextBlock
. Finally, by default it uses one that understands TextBox
es, which matches the implementation of the default TextEditAdornmentTemplate.
This also calls StartTransaction and sets Active to true. You should call AcceptText if you want to finish the edit by modifying the TextBlock and committing the edit transaction. Or call DoCancel if you want to abort the edit.