When I want to really use my nodes, i’d like to create some and after update their name with part.TextEditable using.
Well, i fill a little bit desappointed because, i need 3 clicks to edit the name of the next node I want to update…
On your flow chart example,
first edit a text and change the text a little.
then, try to click on an other node’s text (with in mind, i want to change this text).
Then you need 3 clicks, to be able to edit this one. (one for previous node deselection, one for current node selection, and the final one for text edition).
Have you a trick to enter directly in edit mode if we click on the editable text ?
I now use this new feature… It’s great, but i’d like to go a little far away.
Now when you enter in editing mode for one node,
if you want to edit for a new node, you click only twice (and three times as for SingleClickSelected).
Is it possible to indicate that clicking on editable text, close the previous edition and open the new one… only one click to change edition ?
But after a little thought, I think you might be able to replace the standard Diagram.TextEditingTool with an instance of this:
public class ContinuingTextEditingTool : TextEditingTool {
public override void DoMouseDown() {
bool wasactive = this.Active;
// if clicking elsewhere in diagram, call AcceptText due to MouseDown
base.DoMouseDown();
// see if new click could start editing a TextBlock
if (wasactive && CanStart()) {
Diagram diagram = this.Diagram;
diagram.Dispatcher.BeginInvoke((Action)(() => { diagram.CurrentTool.DoMouseDown(); }));
}
}
}
I have not tested this to make sure there aren’t problems in Silverlight or when there’s a text validation error.