DeepWorks Studios Blazor Component Library

Demo user Administrator ยท Blazor Server Library 20261206222504-6e8ff32.dirty

DwsContainer

This page demonstrates the usage of the DwsContainer component with various configurations.

API Reference

Fixed Container

A container with fixed width and height

This is a fixed-width and fixed-height container.

Show Code
Container.razor

<DwsContainer Name='ContainerDemo_FixedExample' Width='400' Height='200' Class='border border-primary'>
    <DwsTypography Name="ContainerDemo_Text" Typography="DwsTypographyType.Paragraph">This is a fixed-width and fixed-height container.</DwsTypography>
</DwsContainer>

Fluid Width Container

A container with fluid width and fixed height

This is a fluid-width container with a fixed height.

Show Code
Container.razor

<DwsContainer Name='ContainerDemo_FluidWidthExample' IsFluidWidth='true' Height='200' Class='border border-success'>
    <DwsTypography Name="ContainerDemo_Text02" Typography="DwsTypographyType.Paragraph">This is a fluid-width container with a fixed height.</DwsTypography>
</DwsContainer>

Fluid Height Container

A container with fixed width and fluid height

This is a fixed-width container with a fluid height.

Show Code
Container.razor

<DwsContainer Name='ContainerDemo_FluidHeightExample' Width='400' IsFluidHeight='true' Class='border border-warning'>
    <DwsTypography Name="ContainerDemo_Text03" Typography="DwsTypographyType.Paragraph">This is a fixed-width container with a fluid height.</DwsTypography>
</DwsContainer>

Fluid Width and Height Container

A container with fluid width and height

This is a fluid-width and fluid-height container.

Show Code
Container.razor

<DwsContainer Name='ContainerDemo_FluidBothExample' IsFluidWidth='true' IsFluidHeight='true' Class='border border-danger'>
    <DwsTypography Name="ContainerDemo_Text04" Typography="DwsTypographyType.Paragraph">This is a fluid-width and fluid-height container.</DwsTypography>
</DwsContainer>

Container with Min/Max Dimensions

A container with minimum and maximum dimensions

This container has minimum and maximum width and height constraints.

Show Code
Container.razor

<DwsContainer Name='ContainerDemo_MinMaxExample' MinWidth='200' MaxWidth='600' MinHeight='100' MaxHeight='300' Class='border border-info'>
    <DwsTypography Name="ContainerDemo_Text05" Typography="DwsTypographyType.Paragraph">This container has minimum and maximum width and height constraints.</DwsTypography>
</DwsContainer>

Appearance

Outline, Filled, and None appearance modes with a theme color accent

Outline appearance

Filled appearance

None appearance (default)

Show Code
Container.razor

<div class='d-flex gap-3 flex-wrap'>
<DwsContainer Name='ContainerDemo_AppearanceOutline' Appearance='DwsAppearance.Outline' Color='DwsColor.Primary' Width='250' Height='120'>
    <DwsTypography Name="ContainerDemo_Text06" Typography="DwsTypographyType.Paragraph">Outline appearance</DwsTypography>
</DwsContainer>

<DwsContainer Name='ContainerDemo_AppearanceFilled' Appearance='DwsAppearance.Filled' Color='DwsColor.Secondary' Width='250' Height='120'>
    <DwsTypography Name="ContainerDemo_Text07" Typography="DwsTypographyType.Paragraph">Filled appearance</DwsTypography>
</DwsContainer>

<DwsContainer Name='ContainerDemo_AppearanceNone' Appearance='DwsAppearance.None' Width='250' Height='120'>
    <DwsTypography Name="ContainerDemo_Text08" Typography="DwsTypographyType.Paragraph">None appearance (default)</DwsTypography>
</DwsContainer>
</div>

Interface-Description

Name Typ Default Description
IsFluidWidth bool false When true, the container expands horizontally and explicit Width is ignored.
IsFluidHeight bool false When true, the container expands vertically and explicit Height is ignored.
Width int? null Fixed container width in pixels (ignored when IsFluidWidth is true).
MinWidth int? null Minimum container width in pixels.
MaxWidth int? null Maximum container width in pixels.
Height int? null Fixed container height in pixels (ignored when IsFluidHeight is true).
MinHeight int? null Minimum container height in pixels.
MaxHeight int? null Maximum container height in pixels.
Appearance DwsAppearance DwsAppearance.None Visual presentation of the container: None (no border/background), Outline, or Filled.
Color DwsColor DwsColor.Undefined Accent color used by the Outline and Filled appearances. Defaults to Primary when left undefined.
ChildContent RenderFragment? null Content rendered inside the container.
OnClick EventCallback<MouseEventArgs> default Raised when the container is clicked (not raised while in permission register/selection mode).
Class string? null Additional CSS classes for custom styling.
Style string? null Additional inline styles merged with generated sizing styles.
Name Typ Default Description
Element ElementReference The associated web component. May be null if accessed before the component is rendered.
ComponentGuid Guid Unique identifier for the component.
TypeString string The name of the component type, obtained from reflection.
Authorized_RegisterEnabled bool false Indicates whether this component is enabled through a permission registry.
Authorized_RegisterSelected bool false Indicates whether this component is selected in permission selection mode.
GetInitializedState bool false Returns whether the component is initialized.
GetRenderModeState DwsRenderMode Returns the current render mode.
GetComponentState DwsComponentStateType Returns the current component state.
GetIsInteractiveState bool false Returns whether the component is interactive.
GetIsPrerenderingState bool false Returns whether the component is prerendering.
GetComponentLoadingState bool false Returns whether the component is loading.
IsFormBusy bool false Whether the DwsForm (or DwsFormBusyRegion) around the component is locked because its submit handler is running. The state itself is the cascaded FormBusyState (IDwsFormBusyState).
Name Typ Parameters Description
DebugInfo void Logs debug information about the component.
UpdateState void Updates the component's state and triggers StateHasChanged.
UpdateStateAsync Task Asynchronously updates the component's state and triggers StateHasChanged.
Dispose void Disposes the component and releases resources.
FocusAsync ValueTask bool containedInScrollableList Sets focus to the component's element.
Name Typ Default Description
Name string Required unique identifier for the component within its container.
Visible bool true Determines if the component is visible in the UI.
Disabled bool false Disables the form control, ensuring it doesn't participate in form submission.
ComponentNameSpace string The namespace for permission-based access control.
PermissionKey string? null A stable key that takes the place of Name in the generated permission namespace (Page.PermissionKey): the stored permission survives a rename, and components that share a key share one permission entry. Null: keyed by Name. Read once, when the component registers; an explicit ComponentNameSpace wins.
Class string Optional CSS class names.
Style string Optional in-line styles.
Tag object An optional user-defined object to store any additional data with the component.
BackReference DwsReference A reference to the enclosing component.
ID string The HTML ID attribute for the component.
AdditionalAttributes Dictionary<string, object> Additional HTML attributes for the component's root element.
IgnorePermissionChecks bool false Bypasses all permission checks for this component.
IgnorePermissionSelection bool false Ignore permission selection mode for this component.
IgnoreFormBusy bool false Takes the component out of the submit lock of the DwsForm (or DwsFormBusyRegion) around it: IsFormBusy stays false for it.
Name Typ Description
OnInitializedCallbackStarted EventCallback Callback when OnInitialized starts.
OnInitializedCallback EventCallback Callback during OnInitialized.
OnInitializedCallbackCompleted EventCallback Callback when OnInitialized completes.
OnInitializedAsyncCallbackStarted EventCallback Callback when OnInitializedAsync starts.
OnInitializedAsyncCallback EventCallback Callback during OnInitializedAsync.
OnInitializedAsyncCallbackCompleted EventCallback Callback when OnInitializedAsync completes.
OnIsComponentLoadingChanged EventCallback<bool> Callback when IsComponentLoading changes.
OnCurrentRenderModeChanged EventCallback<DwsRenderMode> Callback when CurrentRenderMode changes.
OnComponentStateChanged EventCallback<DwsComponentStateType> Callback when ComponentState changes.
An error has occurred. This app may no longer respond until reloaded.