コード例 #1
0
            public void Position(EndpointItem endpoint)
            {
                var endpointVisual = diagram.GetItemFromContainer(endpoint);

                if (endpointVisual == null)
                {
                    return;
                }

                if (index == 0)
                {
                    firstX = endpointVisual.X;
                }

                if (lastEndpoint != null)
                {
                    endpointVisual.X = firstX + ((lastEndpoint.ActualWidth) * index);
                }

                if (endpointVisual.ActualHeight < MaxHeight)
                {
                    endpointVisual.Height = MaxHeight;
                }

                endpointVisual.Y = -MaxHeight;

                lastEndpoint       = endpointVisual;
                position[endpoint] = index;
                index++;
            }
コード例 #2
0
 public int GetIndexPosition(EndpointItem endpoint)
 {
     return(position[endpoint]);
 }
コード例 #3
0
 public int GetIndexPosition(EndpointItem endpoint) => position[endpoint];