Northwoods.GoWPF 2.2.4 Assembly
DoActivate Method (TextEditingTool)

Start editing the text for a TextBlock.
Syntax
Public Overrides Sub DoActivate() 
public override void DoActivate()
Remarks

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 TextBoxes, 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.

Requirements
See Also

Reference

TextEditingTool Class
TextEditingTool Members
Base Implementation in DoActivate

 

 


© Northwoods Software 2017. All Rights Reserved.

Send Feedback