LayoutTransformer

StockSharp.Xaml.Charting.Common.Helpers

Represents a control that applies a layout transformation to its Content.

Inherits: ContentControl

Constructors

LayoutTransformer
public LayoutTransformer()
layoutTransformer = LayoutTransformer()

Initializes a new instance of the LayoutTransformer class.

Properties

Child
private FrameworkElement Child { get; }
value = layoutTransformer.Child

Gets the child element being transformed.

LayoutTransform
public Transform LayoutTransform { get; set; }
value = layoutTransformer.LayoutTransform
layoutTransformer.LayoutTransform = value

Gets or sets the layout transform to apply on the LayoutTransformer control content.

Methods

ApplyLayoutTransform
public void ApplyLayoutTransform()
layoutTransformer.ApplyLayoutTransform()

Applies the layout transform on the LayoutTransformer control content.

ArrangeOverride
protected override Size ArrangeOverride(Size finalSize)
result = layoutTransformer.ArrangeOverride(finalSize)

Provides the behavior for the "Arrange" pass of layout.

finalSize
The final area within the parent that this element should use to arrange itself and its children.

Returns: The actual size used.

ComputeLargestTransformedSize
private Size ComputeLargestTransformedSize(Size arrangeBounds)
result = layoutTransformer.ComputeLargestTransformedSize(arrangeBounds)

Compute the largest usable size (greatest area) after applying the transformation to the specified bounds.

arrangeBounds
Arrange bounds.

Returns: Largest Size possible.

DiagnosticWriteLine
private static void DiagnosticWriteLine(string message)
LayoutTransformer.DiagnosticWriteLine(message)

Outputs diagnostic info if DIAGNOSTICWRITELINE is defined.

message
Diagnostic message.
GetTransformMatrix
private Matrix GetTransformMatrix(Transform transform)
result = layoutTransformer.GetTransformMatrix(transform)

Walks the Transform(Group) and returns the corresponding Matrix.

transform
Transform(Group) to walk.

Returns: Computed Matrix.

IsSizeSmaller
private static bool IsSizeSmaller(Size a, Size b)
result = LayoutTransformer.IsSizeSmaller(a, b)

Returns true if Size a is smaller than Size b in either dimension.

a
Second Size.
b
First Size.

Returns: True if Size a is smaller than Size b in either dimension.

LayoutTransformChanged
private static void LayoutTransformChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
LayoutTransformer.LayoutTransformChanged(o, e)

Handles changes to the Transform DependencyProperty.

o
Source of the change.
e
Event args.
MatrixHasInverse
private static bool MatrixHasInverse(Matrix matrix)
result = LayoutTransformer.MatrixHasInverse(matrix)

Implements WPF's Matrix.HasInverse on Silverlight.

matrix
Matrix to check for inverse.

Returns: True if the Matrix has an inverse.

MatrixMultiply
private static Matrix MatrixMultiply(Matrix matrix1, Matrix matrix2)
result = LayoutTransformer.MatrixMultiply(matrix1, matrix2)

Implements WPF's Matrix.Multiply on Silverlight.

matrix1
First matrix.
matrix2
Second matrix.

Returns: Multiplication result.

MeasureOverride
protected override Size MeasureOverride(Size availableSize)
result = layoutTransformer.MeasureOverride(availableSize)

Provides the behavior for the "Measure" pass of layout.

availableSize
The available size that this element can give to child elements.

Returns: The size that this element determines it needs during layout, based on its calculations of child element sizes.

OnApplyTemplate
public override void OnApplyTemplate()
layoutTransformer.OnApplyTemplate()

Builds the visual tree for the LayoutTransformer control when a new template is applied.

ProcessTransform
private void ProcessTransform(Transform transform)
layoutTransformer.ProcessTransform(transform)

Processes the Transform to determine the corresponding Matrix.

transform
Transform to process.
RectTransform
private static Rect RectTransform(Rect rect, Matrix matrix)
result = LayoutTransformer.RectTransform(rect, matrix)

Implements WPF's Rect.Transform on Silverlight.

rect
Rect to transform.
matrix
Matrix to transform with.

Returns: Bounding box of transformed Rect.

RoundMatrix
private static Matrix RoundMatrix(Matrix matrix, int decimals)
result = LayoutTransformer.RoundMatrix(matrix, decimals)

Rounds the non-offset elements of a Matrix to avoid issues due to floating point imprecision.

matrix
Matrix to round.
decimals
Number of decimal places to round to.

Returns: Rounded Matrix.

Fields

AcceptableDelta
private const double AcceptableDelta
value = LayoutTransformer.AcceptableDelta

Acceptable difference between two doubles.

DecimalsAfterRound
private const int DecimalsAfterRound
value = LayoutTransformer.DecimalsAfterRound

Number of decimals to round the Matrix to.

LayoutTransformProperty
public static readonly DependencyProperty LayoutTransformProperty
value = LayoutTransformer.LayoutTransformProperty

Identifies the LayoutTransform DependencyProperty.

PresenterName
private const string PresenterName
value = LayoutTransformer.PresenterName

Name of the Presenter template part.

TransformRootName
private const string TransformRootName
value = LayoutTransformer.TransformRootName

Name of the TransformRoot template part.

_childActualSize
private Size _childActualSize
value = layoutTransformer._childActualSize

Actual DesiredSize of Child element (the value it returned from its MeasureOverride method).

_contentPresenter
private ContentPresenter _contentPresenter
value = layoutTransformer._contentPresenter

ContentPresenter element for displaying the content.

_matrixTransform
private MatrixTransform _matrixTransform
value = layoutTransformer._matrixTransform

RenderTransform/MatrixTransform applied to _transformRoot.

_transformation
private Matrix _transformation
value = layoutTransformer._transformation

Transformation matrix corresponding to _matrixTransform.

_transformRoot
private Panel _transformRoot
value = layoutTransformer._transformRoot

Root element for performing transformations.