Adding and altering multiple text items to a Canvas -- what approach?
- by philologon
I am attempting to use a Canvas to create a simple Cad application. I have been able to get lines to draw as I want. For now the only other thing I need is text. The user should be able to edit the text in place. ?Is one of these better to use for this over the others?
Rich Text
TextBlock
TextBox
Label
A more important question, though, is once I have chosen which class to use for implementation, how do I set and get the text value in code? Since the app is in essence a cad application, text will be added, deleted, and altered often, so I am not attempting to put these in XAML, but code-behind. That is why I am asking about how to do this in code.
If the answer is "use X.SetValue()" (or that family of methods), then please tell me what I am supposed to do with the required DependencyProperty reference?
TIA.
Paul