PaddableExtensions

Contains extension methods for .

Contains extension methods for IPaddable.

Methods

public static T PadBottom<T>(T obj, int bottom)

Sets the bottom padding.

Parameters:

obj (T)
The paddable object instance.
bottom (int)
The bottom padding.

Returns:

The same instance so that multiple calls can be chained.

public static T Padding<T>(T obj, int left, int top, int right, int bottom)

Sets the left, top, right and bottom padding.

Parameters:

obj (T)
The paddable object instance.
left (int)
The left padding to apply.
top (int)
The top padding to apply.
right (int)
The right padding to apply.
bottom (int)
The bottom padding to apply.

Returns:

The same instance so that multiple calls can be chained.

public static T Padding<T>(T obj, int horizontal, int vertical)

Sets the horizontal and vertical padding.

Parameters:

obj (T)
The paddable object instance.
horizontal (int)
The left and right padding.
vertical (int)
The top and bottom padding.

Returns:

The same instance so that multiple calls can be chained.

public static T Padding<T>(T obj, Padding padding)

Sets the padding.

Parameters:

obj (T)
The paddable object instance.
padding (Padding)
The padding to apply.

Returns:

The same instance so that multiple calls can be chained.

public static T PadLeft<T>(T obj, int left)

Sets the left padding.

Parameters:

obj (T)
The paddable object instance.
left (int)
The left padding.

Returns:

The same instance so that multiple calls can be chained.

public static T PadRight<T>(T obj, int right)

Sets the right padding.

Parameters:

obj (T)
The paddable object instance.
right (int)
The right padding.

Returns:

The same instance so that multiple calls can be chained.

public static T PadTop<T>(T obj, int top)

Sets the top padding.

Parameters:

obj (T)
The paddable object instance.
top (int)
The top padding.

Returns:

The same instance so that multiple calls can be chained.