Safely returns a transform object. Returns null a transform object could not be created.
Namespace: FirstFloor.DocumentsAssembly: FirstFloor.Documents (in FirstFloor.Documents.dll) Version: 2.5.0.0 (2.5.1.0)
Syntax
| C# |
|---|
public static GeneralTransform SafeTransformToVisual( this UIElement element, UIElement visual ) |
| Visual Basic |
|---|
<ExtensionAttribute> _ Public Shared Function SafeTransformToVisual ( _ element As UIElement, _ visual As UIElement _ ) As GeneralTransform |
| Visual C++ |
|---|
[ExtensionAttribute] public: static GeneralTransform^ SafeTransformToVisual( UIElement^ element, UIElement^ visual ) |
Parameters
- element
- Type: System.Windows..::..UIElement
The element.
- visual
- Type: System.Windows..::..UIElement
The visual.
Return Value
The transform information as an object.Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type UIElement. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Remarks
This method avoids the dreaded ArgumentException when both elements are not in the same visual tree or the layout has not been updated yet.