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.yFilesWPF.Viewer (in yWorks.yFilesWPF.Viewer.dll) Version: 2.2.0.2 (2.2.0.2)

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