An implementation of IPortLocationModel that can be used to create custom port location models out of existing IPortLocationModelParameter instances.

Namespace: yWorks.yFiles.UI.PortLocationModels
Assembly: yWorks.yFilesSilverlight.Viewer (in yWorks.yFilesSilverlight.Viewer.dll) Version: 2.4.0.0

Syntax

C#
public sealed class GenericPortLocationModel : IPortLocationModel, ILookup, IEnumerable<IPortLocationModelParameter>, IEnumerable, IPortLocationModelParameterProvider
Visual Basic
Public NotInheritable Class GenericPortLocationModel _ Implements IPortLocationModel, ILookup, IEnumerable(Of IPortLocationModelParameter), _ IEnumerable, IPortLocationModelParameterProvider

Remarks

This class holds a number of parameters and serves as a container for these parameters. Custom models can easily be created that way:
CopyC#
var genericModel = 
  new GenericPortLocationModel
    {
      NodeScaledPortLocationModel.NodeCenterAnchored,
      NodeScaledPortLocationModel.NodeBottomAnchored, 
      NodeScaledPortLocationModel.NodeTopAnchored, 
      NodeScaledPortLocationModel.NodeRightAnchored,
      NodeScaledPortLocationModel.NodeLeftAnchored, 
    };
GraphControl.Graph.NodeDefaults.Ports.LocationModelParameter = genericModel.Parameters.First();
Note that in order to work, this model needs to have at least one parameter added.

Inheritance Hierarchy

System..::..Object
  yWorks.yFiles.UI.PortLocationModels..::..GenericPortLocationModel

See Also