Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic TextBlock Run causes crash in TemplatedNode (Read 144 times)
Joel D.
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 40
Location: Seattle
Joined: Feb 6th, 2017
TextBlock Run causes crash in TemplatedNode
Sep 4th, 2024 at 7:03pm
Print Post  
I couldn't find other mentions of this on the forums.  It's is not a big deal, but I figured I would let you know:

In a DataTemplate for a TemplatedNode, I tried using a Run in TextBlock. But when I clicked on the text with the intention of dragging to move the node around, an exception was thrown.  I easily got around the situation by using "
" in the Text property of the TextBlock instead of the using Run and LineBreak items.

This is what I tried in the DataTemplate:
<TextBlock>
    <Run Text="Hello" />
    <LineBreak />
    <Run Text="World" />
</TextBlock>

This is what fixed it:
<TextBlock Text="Hello&#10;World" />

It was a System.InvalidOperationException that came from DiagramPresenter with the message: 'System.Windows.Documents.Run' is not a Visual or Visual3D.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3244
Joined: Oct 19th, 2005
Re: TextBlock Run causes crash in TemplatedNode
Reply #1 - Sep 5th, 2024 at 11:22am
Print Post  
New package here should fix that -

https://www.nuget.org/packages/MindFusion.Diagramming.Wpf/4.1.3-alpha

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Joel D.
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 40
Location: Seattle
Joined: Feb 6th, 2017
Re: TextBlock Run causes crash in TemplatedNode
Reply #2 - Sep 5th, 2024 at 10:38pm
Print Post  
Fixed, thanks!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint