Linking to a spot inside a SpotPanel?

Hi,

I’m using goWPF.

I’m trying to have a node consist of a large rectangle with some text on top of it. I’m using a SpotPanel as the container, as such:

<go:SpotPanel go:Node.LinkableTo=“True”
go:Node.ToSpot=“TopBottomSides”>


</go:SpotPanel>

The problem is that links connect to the bounding box that includes the TextBlock, but I would want it to connect to the Rectangle instead. I thought setting the “SpotPanel.Main”, but it obviously only sets the reference.

Setting the “go:Node.LinkableTo” & “go:Node.ToSpot” properties in the Rectangle is even worse, because then (curiously) links can connect from the (left/right) sides.

Any way to do this? There’s probably something I’m missing.

Thanks,

B.

Maybe something like this:

<DataTemplate x:Key="SimpleTemplate"> <StackPanel> <TextBlock Text="{Binding Path=Data.Name, Mode=TwoWay}" Foreground="{Binding Path=Data.MyColor}" FontWeight="Bold" HorizontalAlignment="Right" go:Part.TextEditable="True" /> <Rectangle Width="800" Height="20" Fill="{Binding Path=Data.MyColor}" go:Node.PortId="" go:Node.LinkableTo="True" go:Node.ToSpot="TopBottomSides" /> </StackPanel> </DataTemplate>

Thanks for the answer.

Works fine.

I did try a StackPanel before, but using a Border instead of a Rectangle. Not exactly sure why the behavior is different in this case, but since the Rectangle works fine, I’ll stick with it.

B.

Perhaps because there has to be something inside the Border to give it a size.