Android Guides | Samples

Android.Graphics.Drawables.Drawable.Bounds Property

Return the drawable's bounds Rect.

Syntax

[get: Android.Runtime.Register("getBounds", "()Landroid/graphics/Rect;", "GetGetBoundsHandler")]
[set: Android.Runtime.Register("setBounds", "(Landroid/graphics/Rect;)V", "GetSetBounds_Landroid_graphics_Rect_Handler")]
public Rect Bounds { get; set; }

See Also

Remarks

Get method documentation[Android Documentation]
Return the drawable's bounds Rect. Note: for efficiency, the returned object may be the same object stored in the drawable (though this is not guaranteed), so if a persistent copy of the bounds is needed, call copyBounds(rect) instead. You should also not change the object returned by this method as it may be the same object stored in the drawable.

Set method documentation[Android Documentation]
Specify a bounding rectangle for the Drawable. This is where the drawable will draw when its draw() method is called.

Requirements

Namespace: Android.Graphics.Drawables
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1