WebMap for Blazor
  • WebMap Blazor
    • Modernization
      • Overview
      • Modernization Challenges
      • Our solution
      • What is Blazor?
      • How does Blazor Work?
      • Windows Forms in Blazor
      • Deployment
      • Interfacing with hardware devices
    • Research for Blazor
      • Handling Reference Parameters in Async Methods with Ref<T>
      • Alternatives to Async Properties in C#
      • Issue with using "MessageBox.Show" in Blazor
      • File Upload Functionality
      • Async/Await Feature for WebMap Blazor
    • Assessment Tool
    • Conversion Tool
      • Getting Started
      • Modals and Dialogs
      • Static Service Management
      • ImageListStreamer
      • Solution and Project Structure
        • Solution Generator
    • DCP: Desktop Compatibility Library
      • API Documentation
        • Blazor DCP: Gap.Blazor.Application Class Reference
      • Components Information
        • Button Component
        • Application Data Component
        • GroupBox Component
        • Label Component
        • CheckBox
        • CheckedListBox
        • ComboBox
        • DateTimePicker
        • Form
        • ListBox
        • ListView
          • WMListViewDetails
        • Mdi Container Component
        • MenuStrip
        • MessageBox
        • MonthCalendar
        • Panel
        • PictureBox
        • ProgressBar
        • RadioButton
        • StatusStrip
        • ToolStripStatusLabel
        • TabControl
        • TabPage
        • TextBox
        • ToolStrip
          • ToolStripButton
          • ToolStripLabel
          • ToolStripSeparator
        • ToolTip
    • Post Conversion
      • How To?
        • Create a new WebMap Window?
        • Create a new WebMap Component?
        • Create a native Blazor Window in a WebMap app?
        • Create a native Blazor Component in a WebMap Window?
        • Change the default WebMap visual layout?
    • WebMap: Angular vs Blazor
      • Footprint
      • Binaries size
      • Chatiness
      • Performance
      • Extensibility
      • Maintainability
      • Debugging
      • Project Structure
    • WebMap for Blazor Release Notes
      • Beta version
    • FAQ
    • Errors and Troubleshooting
    • License
Powered by GitBook
On this page
  • Description
  • Usage
  • Properties
  • Methods
  • Dynamic Rendering
  • Styles
  • Events
Export as PDF
  1. WebMap Blazor
  2. DCP: Desktop Compatibility Library
  3. Components Information

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

.@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.

PreviousMonthCalendarNextPictureBox

Last updated 2 days ago