DiagramsFactoryGetScreenCenter Method

Gets the central location of the screen's viewport of a diagram.
Note: the value gets subtracted a bit, as this value is used to get a node to be placed at the center of the screen, so we need to take the left/top offset into account.

Definition

Namespace: MobileTrack.Web.Components.Extensions
Assembly: MobileTrack.Web.Components (in MobileTrack.Web.Components.dll) Version: 0.8+34f1bbd8dc6b32752cfce829cbed66e15113d7ba
public static Point GetScreenCenter(
	this Diagram diagram
)

Parameters

diagram  Diagram
Diagram to get the screen's center point from

Return Value

Point
Calculated central point.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Diagram. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also