# IModifiedExtensions

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 [IModified](/api/wisej.web/interfaces/wisej.web.imodified.md) interface.

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

```csharp
public class IModifiedExtensions
```

{% endtab %}

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

```visual-basic
Public Class IModifiedExtensions
```

{% endtab %}
{% endtabs %}

## Methods

### ![](/files/lIX317sDtMTZJBi9oSIx) Modified\<TModified>(target, value)

Sets the [Modified](/api/wisej.web/interfaces/wisej.web.imodified.md#modified) property of the target to the specified value.

| Parameter     | Type                                                                                  | Description                                                                                                          |
| ------------- | ------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| **TModified** |                                                                                       | The type of the target, which must implement [IModified](/api/wisej.web/interfaces/wisej.web.imodified.md).          |
| **target**    | [TModified](/api/wisej.web.markup/extensions/wisej.web.markup.imodifiedextensions.md) | The target object whose [Modified](/api/wisej.web/interfaces/wisej.web.imodified.md#modified) property is to be set. |
| **value**     | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                       | The value to set for the [Modified](/api/wisej.web/interfaces/wisej.web.imodified.md#modified) property.             |

**Returns:** [TModified](/api/wisej.web.markup/extensions/wisej.web.markup.imodifiedextensions.md). The target object with the modified property set.

This method allows for fluent syntax when setting the [Modified](/api/wisej.web/interfaces/wisej.web.imodified.md#modified) property.

```csharp

var modifiedObject = someObject.Modified(true);

```

### ![](/files/lIX317sDtMTZJBi9oSIx) OnModifiedChanged\<TModified>(target, action)

Subscribes an action to the [ModifiedChanged](/api/wisej.web/interfaces/wisej.web.imodified.md#modifiedchanged) event of the target.

| Parameter     | Type                                                                                  | Description                                                                                                                               |
| ------------- | ------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| **TModified** |                                                                                       | The type of the target, which must implement [IModified](/api/wisej.web/interfaces/wisej.web.imodified.md).                               |
| **target**    | [TModified](/api/wisej.web.markup/extensions/wisej.web.markup.imodifiedextensions.md) | The target object whose [ModifiedChanged](/api/wisej.web/interfaces/wisej.web.imodified.md#modifiedchanged) event is to be subscribed to. |
| **action**    | [Action\<TModified>](https://docs.microsoft.com/dotnet/api/system.action-1)           | The action to invoke when the [ModifiedChanged](/api/wisej.web/interfaces/wisej.web.imodified.md#modifiedchanged) event is raised.        |

**Returns:** [TModified](/api/wisej.web.markup/extensions/wisej.web.markup.imodifiedextensions.md). The target object with the event subscription added.

This method allows for fluent syntax when subscribing to the [ModifiedChanged](/api/wisej.web/interfaces/wisej.web.imodified.md#modifiedchanged) event.

```csharp

someObject.OnModifiedChanged(obj => AlertBox.Show("Modified changed!"));

```


---

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