> For the complete documentation index, see [llms.txt](https://docs.gapvelocity.ai/blazor-ai-migrator/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gapvelocity.ai/blazor-ai-migrator/blazor-ai-migrator/dcp-desktop-compatibility-library/components-information/panel.md).

# Panel

### **Description**

This component represents a panel container in Blazor using the `Gap.Blazor.Panel` model. It provides a styled container for grouping other components or content, with support for dynamic border styles, scroll behavior, and mouse interaction events.

### **Usage**

```
@if (this.Visible)
{   
    <WMStyleBase model=@panel></WMStyleBase>
    <div class="@this.panel.GetStringClasses()" 
         @ref="elementRef" 
         @onmouseup="MouseUpHandler" 
         @onmousemove="MouseMoveHandler">
        @ChildContent
    </div>

    <style>
        .@model.GetComponentClass() {           
            border: @this.GetBorderCss();
            overflow: @this.panel.GetAutoScrollStyle();
        }
    </style>
}

```

### **Properties**

* **panel**: Instance of the `Gap.Blazor.Panel` model.
* **elementRef**: Reference to the rendered DOM element (used for interop or focus).
* **ChildContent**: The content rendered inside the panel.

### **Methods**

* **OnInitialized()**: Subscribes to model events:
  * `BorderStyleChanged`
  * `AutoScrollChanged`
* **GetBorderCss()**: Returns the CSS border style based on the model’s `BorderStyle`, only if the panel has a defined `Width` and `Top` position.

### **Dynamic Rendering**

* **WMStyleBase**: Applies base styles from the model.
* **CSS Classes**: Dynamically generated using `panel.GetStringClasses()` and `model.GetComponentClass()`.
* **Mouse Events**: `@onmouseup` and `@onmousemove` handlers are attached for interaction support.

### **Styles**

```css
.@model.GetComponentClass() {
    border: [based on BorderStyle];
    overflow: [based on AutoScroll];
}

```

### **Events**

* **BorderStyleChanged**: Triggers UI update when the border style changes.
* **AutoScrollChanged**: Triggers UI update when scroll behavior changes.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.gapvelocity.ai/blazor-ai-migrator/blazor-ai-migrator/dcp-desktop-compatibility-library/components-information/panel.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.
