Click or drag to resize
AB4D logo

ExtensionsGetName(Visual3D) Method

Gets name of the Visual3D that was previously set by SetName extension method.

Namespace: Ab3d
Assembly: Ab3d.PowerToys (in Ab3d.PowerToys.dll) Version: 11.1.8864.1045
Syntax
C#
public static string GetName(
	this Visual3D visual3D
)

Parameters

visual3D  Visual3D
Visual3D

Return Value

String
name that was previously set by SetName extension method

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Visual3D. 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).
Remarks

Though many objects in WPF does not have Name property (with public Name getters and setters), it is still possible to set value for the Name property with using a SetValue method on DependencyObjects:

C#
dependencyObjects.SetValue(FrameworkElement.NameProperty, name);

The value of the Name can than be read with:

C#
return dependencyObjects.GetValue(FrameworkElement.NameProperty) as string;

The SetName and GetName extension methods simplify setting the values on commonly used 3D objects.

See Also