An implementation of IPortLocationModel that can be used to create custom
port location models out of existing IPortLocationModelParameter instances.
Namespace: yWorks.yFiles.UI.PortLocationModelsAssembly: yWorks.yFilesSilverlight.Viewer (in yWorks.yFilesSilverlight.Viewer.dll) Version: 2.1.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#
Note that in order to work, this model needs to have at least one parameter added.
var genericModel =
new GenericPortLocationModel
{
NodeScaledPortLocationModel.NodeCenterAnchored,
NodeScaledPortLocationModel.NodeBottomAnchored,
NodeScaledPortLocationModel.NodeTopAnchored,
NodeScaledPortLocationModel.NodeRightAnchored,
NodeScaledPortLocationModel.NodeLeftAnchored,
};
GraphControl.Graph.NodeDefaults.Ports.LocationModelParameter = genericModel.Parameters.First();
Inheritance Hierarchy
System..::..Object
yWorks.yFiles.UI.PortLocationModels..::..GenericPortLocationModel
yWorks.yFiles.UI.PortLocationModels..::..GenericPortLocationModel