强制使用NodeShape的连接点

强制使用NodeShape的连接点

本文介绍了强制使用NodeShape的连接点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


有人知道如何从形状各边的中间强制NodeShape的连接点吗?
我尝试使用确保连接点和HasConnectionPoints,但不起作用

谢谢!

Hi
Does anyone know how to force the connection points of a NodeShape from the middle of each side of the shape?
I tried to use EnsureConnectionPoints and HasConnectionPoints but doesn't work

Thanks!

推荐答案

public override bool CanManuallyRoute
{
    get
    {
        return false;
    }
}

protected override VGRoutingStyle DefaultRoutingStyle
{
    get
    {
        return VGRoutingStyle.VGRouteCenterToCenter | VGRoutingStyle.VGRouteStraight;
    }
}

希望这可以解决您的问题;是吗?

注意:
1.强制覆盖 CanManuallyRoute不是强制性的. 这是为了禁止用户干扰我们的位置
2.您可以选择必需的 DefaultRoutingStyle 作为 VGRoutingStyle 与"|"组合使用.根据您的要求进行二进制操作.

Hopefully, this will resolve your issues; right?

Note:
1. It is not mandatory to override CanManuallyRoute. This is to disable the user from disturbing our positioning
2. You can choose the required DefaultRoutingStyle as single or in combination of VGRoutingStyle with "|" binary operation according to your requirements.


这篇关于强制使用NodeShape的连接点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-26 09:07