Resizable and draggable textblock

Can you help me to create a data template with textblock (or other kind of control) where I can edit text after double click on it, drag it over the diagram, resize it and allow the “Enter” key to break a line while editing?
Here is the closest template that I came up to:

<DataTemplate x:Key="myText">
            <go:NodePanel Sizing="Auto" go:LinkPanel.Orientation="None"  go:Part.Resizable="False"  go:Part.SelectionAdorned="True" >
                <Border BorderThickness="1" BorderBrush="Black">
                    <TextBlock Text="{Binding Path=Data.GateData.ImagePath,Mode=TwoWay}" Width="50" TextWrapping="Wrap" TextAlignment="Left" go:Part.TextEditable="True" Margin="10"  />


Did you want the user to be able to resize the node? If so why do you set Part.Resizable to false?

I do, but when I set Part.Resizable to true, I receive following behaviour when resizing:

Yes, if you want the user to resize the whole node, you need to set go.NodePanel.Sizing="Fixed", not “Auto”. And remove the Width on the TextBlock, to allow it to change its width.

Or else if you want the user to resize the text itself, then you can leave NodePanel.Sizing as “Auto” but set Part.ResizeElementName to refer to the TextBlock, which you’ll need to x:Name.

How can I achieve that “Enter” key breaks a line?
Another issue is when I copy an external text (from notepad for example) to the node, only the first line is copied.

You can determine the appearance and behavior of the TextBox used as the text editor by specifying the go:Part.TextEditAdornmentTemplate on your TextBlock. You can start with the default text editor template defined in Themes/Generic.xaml.

That includes turning on the TextBox.AcceptsReturn property, which defaults to false. TextBox Class (Windows.UI.Xaml.Controls) - Windows UWP applications | Microsoft Learn

For example, here’s an example I just tried:

            <TextBlock Grid.Row="1" Text="{Binding Path=Data.PersonData, Mode=TwoWay}" go:Part.TextEditable="True"
                       TextAlignment="Left" TextWrapping="Wrap" Margin="4 4 4 2">
                <TextBox FontFamily="{Binding Path=Node.AdornedElement.FontFamily, Mode=OneTime}"
                         FontSize="{Binding Path=Node.AdornedElement.FontSize, Mode=OneTime}"
                         FontStretch="{Binding Path=Node.AdornedElement.FontStretch, Mode=OneTime}"
                         FontStyle="{Binding Path=Node.AdornedElement.FontStyle, Mode=OneTime}"
                         FontWeight="{Binding Path=Node.AdornedElement.FontWeight, Mode=OneTime}"
                         TextAlignment="{Binding Path=Node.AdornedElement.TextAlignment, Mode=OneTime}"
                         TextDecorations="{Binding Path=Node.AdornedElement.TextDecorations, Mode=OneTime}"
                         TextWrapping="{Binding Path=Node.AdornedElement.TextWrapping, Mode=OneTime}"
                         Foreground="Black" />