# ShapeExtensions

Namespace: **Wisej.Web.Markup**

Assembly: **Wisej.Framework** (4.0.0.0)

Adds [fluent markup](https://learn.microsoft.com/en-us/dotnet/communitytoolkit/maui/markup/markup) extension methods to the [Shape](/api/wisej.web/content/shape.md) class.

{% tabs %}
{% tab title="C#" %}

```csharp
public class ShapeExtensions
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class ShapeExtensions
```

{% endtab %}
{% endtabs %}

## Methods

### ![](/files/lIX317sDtMTZJBi9oSIx) BorderStyle\<TShape>(shape, borderStyle)

Sets the BorderStyle property of the specified [Shape](/api/wisej.web/content/shape.md).

| Parameter       | Type                                                                           | Description                                                                                      |
| --------------- | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
| **TShape**      |                                                                                | The type of the shape, must inherit from [Shape](/api/wisej.web/content/shape.md).               |
| **shape**       | [TShape](/api/wisej.web.markup/extensions/wisej.web.markup.shapeextensions.md) | The shape for which to set the BorderStyle property.                                             |
| **borderStyle** | [Border](/api/wisej.web/content/shape/wisej.web.shape.border.md)               | The [Border](/api/wisej.web/content/shape/wisej.web.shape.border.md) style to set for the shape. |

**Returns:** [TShape](/api/wisej.web.markup/extensions/wisej.web.markup.shapeextensions.md). The modified shape with the updated BorderStyle property.

This method allows you to specify the overall border style of the shape.

```csharp

myShape.BorderStyle(Shape.Border.Solid);

```

### ![](/files/lIX317sDtMTZJBi9oSIx) BorderStyleBottom\<TShape>(shape, borderStyle)

Sets the BorderStyleBottom property of the specified [Shape](/api/wisej.web/content/shape.md).

| Parameter       | Type                                                                           | Description                                                                                                           |
| --------------- | ------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------- |
| **TShape**      |                                                                                | The type of the shape, must inherit from [Shape](/api/wisej.web/content/shape.md).                                    |
| **shape**       | [TShape](/api/wisej.web.markup/extensions/wisej.web.markup.shapeextensions.md) | The shape for which to set the BorderStyleBottom property.                                                            |
| **borderStyle** | [Border](/api/wisej.web/content/shape/wisej.web.shape.border.md)               | The [Border](/api/wisej.web/content/shape/wisej.web.shape.border.md) style to set for the bottom border of the shape. |

**Returns:** [TShape](/api/wisej.web.markup/extensions/wisej.web.markup.shapeextensions.md). The modified shape with the updated BorderStyleBottom property.

This method allows you to specify the border style for the bottom edge of the shape.

```csharp

myShape.BorderStyleBottom(Shape.Border.Solid);

```

### ![](/files/lIX317sDtMTZJBi9oSIx) BorderStyleLeft\<TShape>(shape, borderStyle)

Sets the BorderStyleLeft property of the specified [Shape](/api/wisej.web/content/shape.md).

| Parameter       | Type                                                                           | Description                                                                                                         |
| --------------- | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------- |
| **TShape**      |                                                                                | The type of the shape, must inherit from [Shape](/api/wisej.web/content/shape.md).                                  |
| **shape**       | [TShape](/api/wisej.web.markup/extensions/wisej.web.markup.shapeextensions.md) | The shape for which to set the BorderStyleLeft property.                                                            |
| **borderStyle** | [Border](/api/wisej.web/content/shape/wisej.web.shape.border.md)               | The [Border](/api/wisej.web/content/shape/wisej.web.shape.border.md) style to set for the left border of the shape. |

**Returns:** [TShape](/api/wisej.web.markup/extensions/wisej.web.markup.shapeextensions.md). The modified shape with the updated BorderStyleLeft property.

This method allows you to specify the border style for the left edge of the shape.

```csharp

myShape.BorderStyleLeft(Shape.Border.Dotted);

```

### ![](/files/lIX317sDtMTZJBi9oSIx) BorderStyleRight\<TShape>(shape, borderStyle)

Sets the BorderStyleRight property of the specified [Shape](/api/wisej.web/content/shape.md).

| Parameter       | Type                                                                           | Description                                                                                                          |
| --------------- | ------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------- |
| **TShape**      |                                                                                | The type of the shape, must inherit from [Shape](/api/wisej.web/content/shape.md).                                   |
| **shape**       | [TShape](/api/wisej.web.markup/extensions/wisej.web.markup.shapeextensions.md) | The shape for which to set the BorderStyleRight property.                                                            |
| **borderStyle** | [Border](/api/wisej.web/content/shape/wisej.web.shape.border.md)               | The [Border](/api/wisej.web/content/shape/wisej.web.shape.border.md) style to set for the right border of the shape. |

**Returns:** [TShape](/api/wisej.web.markup/extensions/wisej.web.markup.shapeextensions.md). The modified shape with the updated BorderStyleRight property.

This method allows you to specify the border style for the right edge of the shape.

```csharp

myShape.BorderStyleRight(Shape.Border.None);

```

### ![](/files/lIX317sDtMTZJBi9oSIx) BorderStyleTop\<TShape>(shape, borderStyle)

Sets the BorderStyleTop property of the specified [Shape](/api/wisej.web/content/shape.md).

| Parameter       | Type                                                                           | Description                                                                                                        |
| --------------- | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ |
| **TShape**      |                                                                                | The type of the shape, must inherit from [Shape](/api/wisej.web/content/shape.md).                                 |
| **shape**       | [TShape](/api/wisej.web.markup/extensions/wisej.web.markup.shapeextensions.md) | The shape for which to set the BorderStyleTop property.                                                            |
| **borderStyle** | [Border](/api/wisej.web/content/shape/wisej.web.shape.border.md)               | The [Border](/api/wisej.web/content/shape/wisej.web.shape.border.md) style to set for the top border of the shape. |

**Returns:** [TShape](/api/wisej.web.markup/extensions/wisej.web.markup.shapeextensions.md). The modified shape with the updated BorderStyleTop property.

This method allows you to specify the border style for the top edge of the shape.

```csharp

myShape.BorderStyleTop(Shape.Border.Dashed);

```

### ![](/files/lIX317sDtMTZJBi9oSIx) Rotation\<TShape>(shape, rotation)

Sets the Rotation property of the specified [Shape](/api/wisej.web/content/shape.md).

| Parameter    | Type                                                                           | Description                                                                        |
| ------------ | ------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |
| **TShape**   |                                                                                | The type of the shape, must inherit from [Shape](/api/wisej.web/content/shape.md). |
| **shape**    | [TShape](/api/wisej.web.markup/extensions/wisej.web.markup.shapeextensions.md) | The shape for which to set the Rotation property.                                  |
| **rotation** | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                    | The rotation angle in degrees to set for the shape.                                |

**Returns:** [TShape](/api/wisej.web.markup/extensions/wisej.web.markup.shapeextensions.md). The modified shape with the updated Rotation property.

This method allows you to specify the rotation angle of the shape.

```csharp

myShape.Rotation(90);

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wisej.com/api/wisej.web.markup/extensions/wisej.web.markup.shapeextensions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
