TextEditingTool
The TextEditingTool is used to let the user interactively edit text in place.
继承自: DiagramTool
属性
AdornedPart : Part
Gets the current Part that the TextBlock is in.
EditorAdornment : Adornment
Gets or sets the "editor" Adornment that contains the control used to edit the text.
Starting : TextEditingStarting
Gets or sets how user gestures can start in-place editing of text.
TextEditor : ITextEditor
Gets or sets the "editing" code that manages the interactions of the EditorAdornment.
方法
AcceptText(TextEditingReason)
Finish editing by trying to accept the new text.
CanStart() : bool
The TextEditingTool may run when there is a mouse-click on a TextBlock for which the go:Part.TextEditable attached property is true in a Part that IsSelected.
DoAcceptText() : bool
Modify the TextBlock's Text property to the new text string value if it String).
返回值: True if it succeeds, false if String) was false.
DoActivate()
Start editing the text for a TextBlock.
DoDeactivate()
This stops the current transaction and removes the editor adornment.
DoMouseDown()
If the user clicks elsewhere in the diagram, call TextEditingReason).
DoMouseUp()
A click (mouse up) calls DoActivate if this tool is not already active and if CanStart returns true.
DoStart()
When starting this tool, call DoActivate if there is a TextBlock supplied.
IsValidText(string, string) : bool
Decide whether the proposed new text string is valid.
- oldstring
- newstring
返回值: By default this returns true
字段
StartingProperty : DependencyProperty
Identifies the Starting dependency property.