C# Класс SilverFlow.Controls.Controllers.SnapinController

Provides helpers methods for calculating window position during movement and resizing.
Наследование: ISnapinController
Показать файл Открыть проект

Private Properties

Свойство Тип Описание
DistanceBetweenBottomEdgeAndRectangle double
DistanceBetweenLeftEdgeAndRectangle double
DistanceBetweenRectangles Distance
DistanceBetweenRightEdgeAndRectangle double
DistanceBetweenTopEdgeAndRectangle double

Открытые методы

Метод Описание
SnapBottomLeftCorner ( Rect rect ) : Point

Snaps the lower left corner of the specified rectangle to the nearest bounds.

SnapBottomRightCorner ( Rect rect ) : Point

Snaps the bottom right corner of the specified rectangle to the nearest bounds.

SnapRectangle ( Rect rect ) : Point

Returns new position of the specified rectangle taking into account bounds the rectangle can be attracted to.

SnapTopLeftCorner ( Rect rect ) : Point

Snaps the upper left corner of the specified rectangle to the nearest bounds.

SnapTopRightCorner ( Rect rect ) : Point

Snaps the upper right corner of the specified rectangle to the nearest bounds.

Приватные методы

Метод Описание
DistanceBetweenBottomEdgeAndRectangle ( Rect first, Rect second ) : double

Returns distance between the bottom edge of the rectangle and another rectangle.

DistanceBetweenLeftEdgeAndRectangle ( Rect first, Rect second ) : double

Returns distance between the left edge of the rectangle and another rectangle.

DistanceBetweenRectangles ( Rect first, Rect second ) : Distance

Returns mininal distance between two rectangles.

DistanceBetweenRightEdgeAndRectangle ( Rect first, Rect second ) : double

Returns distance between the right edge of the rectangle and another rectangle.

DistanceBetweenTopEdgeAndRectangle ( Rect first, Rect second ) : double

Returns distance between the top edge of the rectangle and another rectangle.

Описание методов

SnapBottomLeftCorner() публичный Метод

Snaps the lower left corner of the specified rectangle to the nearest bounds.
public SnapBottomLeftCorner ( Rect rect ) : Point
rect System.Windows.Rect The rectangle.
Результат System.Windows.Point

SnapBottomRightCorner() публичный Метод

Snaps the bottom right corner of the specified rectangle to the nearest bounds.
public SnapBottomRightCorner ( Rect rect ) : Point
rect System.Windows.Rect The rectangle.
Результат System.Windows.Point

SnapRectangle() публичный Метод

Returns new position of the specified rectangle taking into account bounds the rectangle can be attracted to.
public SnapRectangle ( Rect rect ) : Point
rect System.Windows.Rect The rectangle.
Результат System.Windows.Point

SnapTopLeftCorner() публичный Метод

Snaps the upper left corner of the specified rectangle to the nearest bounds.
public SnapTopLeftCorner ( Rect rect ) : Point
rect System.Windows.Rect The rectangle.
Результат System.Windows.Point

SnapTopRightCorner() публичный Метод

Snaps the upper right corner of the specified rectangle to the nearest bounds.
public SnapTopRightCorner ( Rect rect ) : Point
rect System.Windows.Rect The rectangle.
Результат System.Windows.Point