A Swiss Army knife for developers.
C# blazorcross-platformcsharpdesktopdesktop-appdesktop-applicationdeveloper-toolsextensiblefluentfluent-designlinuxmacosmicasyntax-highlightingtypescriptwindowswindows-10windows-11winui
@namespace DevToys.Blazor.Components
@inherits StyledComponentBase
<CascadingValue Name="ParentIsEnabled" Value="@IsActuallyEnabled">
<Container HorizontalAlignment="@HorizontalAlignment"
VerticalAlignment="@VerticalAlignment"
Width="@Width"
Height="@Height"
MarginLeft="@MarginLeft"
MarginRight="@MarginRight"
MarginTop="@MarginTop"
MarginBottom="@MarginBottom"
PaddingLeft="@PaddingLeft"
PaddingRight="@PaddingRight"
PaddingTop="@PaddingTop"
PaddingBottom="@PaddingBottom"
IsEnabled="@IsActuallyEnabled"
IsVisible="@IsVisible">
<div class="card @(FinalCssClasses)"
style="@(Style)"
@ref=Element
@attributes="AdditionalAttributes">
@if (!string.IsNullOrWhiteSpace(Title))
{
<div class="card-header">
<FontIcon class="card-icon"
Glyph="@IconGlyph"
FontFamily="@IconFontFamily"
Width="20"
Height="20" />
<div class="card-context">
<div class="card-title">
<TextBlock Appearance="TextBlockAppearance.Body"
Text="@Title"
CanTrim="true"
Style="display: flex;" />
</div>
@if (!string.IsNullOrWhiteSpace(Description))
{
<div class="card-description">
<TextBlock Appearance="TextBlockAppearance.Caption"
Text="@Description"
Style="display: flex;" />
</div>
}
</div>
</div>
}
@if (Control is not null)
{
<div class="card-control @(IsChildOfExpander ? "child-of-expander" : string.Empty)">
<StackPanel VerticalAlignment="UIVerticalAlignment.Center" HorizontalAlignment="UIHorizontalAlignment.Stretch">
@Control
</StackPanel>
</div>
}
@if (ChildContent is not null)
{
@ChildContent
}
</div>
</Container>
</CascadingValue>