# LineExtensions

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 [Line](/api/wisej.web/content/wisej.web.line.md) class.

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

```csharp
public class LineExtensions
```

{% endtab %}

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

```visual-basic
Public Class LineExtensions
```

{% endtab %}
{% endtabs %}

## Methods

### ![](/files/lIX317sDtMTZJBi9oSIx) LineColor\<TLine>(line, color)

Sets the LineColor property of the specified [Line](/api/wisej.web/content/wisej.web.line.md).

| Parameter | Type                                                                         | Description                                                                                  |
| --------- | ---------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| **TLine** |                                                                              | The type of the line, must inherit from [Line](/api/wisej.web/content/wisej.web.line.md).    |
| **line**  | [TLine](/api/wisej.web.markup/extensions/wisej.web.markup.lineextensions.md) | The line for which to set the LineColor property.                                            |
| **color** | [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color)          | The [Color](https://docs.microsoft.com/dotnet/api/system.drawing.color) to set for the line. |

**Returns:** [TLine](/api/wisej.web.markup/extensions/wisej.web.markup.lineextensions.md). The modified line with the updated LineColor property.

This method allows you to specify the color of the line.

```csharp

myLine.LineColor(Color.Red);

```

### ![](/files/lIX317sDtMTZJBi9oSIx) LineSize\<TLine>(line, size)

Sets the LineSize property of the specified [Line](/api/wisej.web/content/wisej.web.line.md).

| Parameter | Type                                                                         | Description                                                                               |
| --------- | ---------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| **TLine** |                                                                              | The type of the line, must inherit from [Line](/api/wisej.web/content/wisej.web.line.md). |
| **line**  | [TLine](/api/wisej.web.markup/extensions/wisej.web.markup.lineextensions.md) | The line for which to set the LineSize property.                                          |
| **size**  | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                  | The size (thickness) of the line.                                                         |

**Returns:** [TLine](/api/wisej.web.markup/extensions/wisej.web.markup.lineextensions.md). The modified line with the updated LineSize property.

This method allows you to specify the size (thickness) of the line.

```csharp

myLine.LineSize(5);

```

### ![](/files/lIX317sDtMTZJBi9oSIx) LineStyle\<TLine>(line, style)

Sets the LineStyle property of the specified [Line](/api/wisej.web/content/wisej.web.line.md).

| Parameter | Type                                                                         | Description                                                                               |
| --------- | ---------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| **TLine** |                                                                              | The type of the line, must inherit from [Line](/api/wisej.web/content/wisej.web.line.md). |
| **line**  | [TLine](/api/wisej.web.markup/extensions/wisej.web.markup.lineextensions.md) | The line for which to set the LineStyle property.                                         |
| **style** | [LineStyle](/api/wisej.web/enumerations/wisej.web.linestyle.md)              | The [LineStyle](#linestyle``1) to set for the line.                                       |

**Returns:** [TLine](/api/wisej.web.markup/extensions/wisej.web.markup.lineextensions.md). The modified line with the updated LineStyle property.

This method allows you to specify the style of the line, such as solid, dashed, etc.

```csharp

myLine.LineStyle(LineStyle.Dashed);

```

### ![](/files/lIX317sDtMTZJBi9oSIx) Orientation\<TLine>(line, orientation)

Sets the Orientation property of the specified [Line](/api/wisej.web/content/wisej.web.line.md).

| Parameter       | Type                                                                         | Description                                                                               |
| --------------- | ---------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| **TLine**       |                                                                              | The type of the line, must inherit from [Line](/api/wisej.web/content/wisej.web.line.md). |
| **line**        | [TLine](/api/wisej.web.markup/extensions/wisej.web.markup.lineextensions.md) | The line for which to set the Orientation property.                                       |
| **orientation** | [Orientation](/api/wisej.web/enumerations/wisej.web.orientation.md)          | The [Orientation](#orientation``1) to set for the line.                                   |

**Returns:** [TLine](/api/wisej.web.markup/extensions/wisej.web.markup.lineextensions.md). The modified line with the updated Orientation property.

This method allows you to specify the orientation of the line, such as horizontal or vertical.

```csharp

myLine.Orientation(Orientation.Horizontal);

```


---

# 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.lineextensions.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.
