I have a few questions about the context menu of nodes, and also related to editing text in nodes.
Based on the documentation at this link (
https://www.mindfusion.eu/onlinehelp/xamarin.diagram/index.htm), I can prevent a user from editing the text of a node by handling the
NodeTextEditing event on a diagram object. However, beyond that piece of information, no other information is provided. I've gone ahead and implemented an event handler, but it isn't clear on exactly
how to implement the event handler so to prevent text editing.
My intuition would be to set a flag or return some boolean value to the caller, but the function doesn't have a return value, and there isn't an obvious flag to set anywhere. Any help in this regard would be appreciated.
Next question: is there a way to customize the context menu itself? Right now when I do a "long press" on a node, the context menu pops up as 3 icons: one to the left (a text editing icon), one above the node (a trash/delete icon), and one to the right (a paperclip icon - I haven't tested what it does). I'd like to customize what icons show up there, or maybe even have a dialog pop up or a new screen slide in when the user tries to open the context menu.
Edited: More questions:
Currently, when in "text editing mode" for a node, it basically covers the entire node with a dark green rectangle. Is there any way to change this?
Also, the font size can seem quite small while editing. I know how to change the font size for existing text in a node (set the FontSize property in the ShapeNodeStyle object of the Style property on the node), but what about changing the font size of the text during editing? Is there a way to do so?
Also, is there a way to make it so that the text does not "wrap" if it is over a certain length? My solution for now is to inspect the incoming text that a user has entered, and if it is "too long" then I will modify the text to make it shorter.