LayoutTransformer
Represents a control that applies a layout transformation to its Content.
Erbt von: ContentControl
Konstruktoren
LayoutTransformer()
Initializes a new instance of the LayoutTransformer class.
Eigenschaften
Child : FrameworkElement
Gets the child element being transformed.
LayoutTransform : Transform
Gets or sets the layout transform to apply on the LayoutTransformer control content.
Methoden
ApplyLayoutTransform()
Applies the layout transform on the LayoutTransformer control content.
ArrangeOverride(Size) : Size
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.
Rückgabe: The actual size used.
ComputeLargestTransformedSize(Size) : Size
Compute the largest usable size (greatest area) after applying the transformation to the specified bounds.
- arrangeBounds
- Arrange bounds.
Rückgabe: Largest Size possible.
DiagnosticWriteLine(string)
Outputs diagnostic info if DIAGNOSTICWRITELINE is defined.
- message
- Diagnostic message.
GetTransformMatrix(Transform) : Matrix
Walks the Transform(Group) and returns the corresponding Matrix.
- transform
- Transform(Group) to walk.
Rückgabe: Computed Matrix.
IsSizeSmaller(Size, Size) : bool
Returns true if Size a is smaller than Size b in either dimension.
- a
- Second Size.
- b
- First Size.
Rückgabe: True if Size a is smaller than Size b in either dimension.
LayoutTransformChanged(DependencyObject, DependencyPropertyChangedEventArgs)
Handles changes to the Transform DependencyProperty.
- o
- Source of the change.
- e
- Event args.
MatrixHasInverse(Matrix) : bool
Implements WPF's Matrix.HasInverse on Silverlight.
- matrix
- Matrix to check for inverse.
Rückgabe: True if the Matrix has an inverse.
MatrixMultiply(Matrix, Matrix) : Matrix
Implements WPF's Matrix.Multiply on Silverlight.
- matrix1
- First matrix.
- matrix2
- Second matrix.
Rückgabe: Multiplication result.
MeasureOverride(Size) : Size
Provides the behavior for the "Measure" pass of layout.
- availableSize
- The available size that this element can give to child elements.
Rückgabe: The size that this element determines it needs during layout, based on its calculations of child element sizes.
OnApplyTemplate()
Builds the visual tree for the LayoutTransformer control when a new template is applied.
ProcessTransform(Transform)
Processes the Transform to determine the corresponding Matrix.
- transform
- Transform to process.
RectTransform(Rect, Matrix) : Rect
Implements WPF's Rect.Transform on Silverlight.
- rect
- Rect to transform.
- matrix
- Matrix to transform with.
Rückgabe: Bounding box of transformed Rect.
RoundMatrix(Matrix, int) : Matrix
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.
Rückgabe: Rounded Matrix.
Felder
AcceptableDelta : double
Acceptable difference between two doubles.
DecimalsAfterRound : int
Number of decimals to round the Matrix to.
LayoutTransformProperty : DependencyProperty
Identifies the LayoutTransform DependencyProperty.
PresenterName : string
Name of the Presenter template part.
TransformRootName : string
Name of the TransformRoot template part.
_childActualSize : Size
Actual DesiredSize of Child element (the value it returned from its MeasureOverride method).
_contentPresenter : ContentPresenter
ContentPresenter element for displaying the content.
_matrixTransform : MatrixTransform
RenderTransform/MatrixTransform applied to _transformRoot.
_transformation : Matrix
Transformation matrix corresponding to _matrixTransform.
_transformRoot : Panel
Root element for performing transformations.