원클릭으로
uno-toolkit-card
Use CardContentControl for elevated, filled, or outlined card containers.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Use CardContentControl for elevated, filled, or outlined card containers.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Create and use commands in MVUX for user interactions.
Create and use IFeed<T> for async data in MVUX.
Display async feed data with FeedView control.
Create and use IListFeed<T> for reactive collections in MVUX.
Create and use IListState<T> for mutable reactive collections in MVUX.
Use messaging to sync MVUX states with entity changes.
| name | uno-toolkit-card |
| description | Use CardContentControl for elevated, filled, or outlined card containers. |
| when_to_use | ALWAYS use this skill when building any card-like UI — elevated, filled, or outlined containers. ALWAYS use `CardContentControl` — never use `Card` (it has rigid predefined slots that limit layout flexibility). ALWAYS use this skill instead of creating a `Border` used as a card (with `CornerRadius` combined with `Background`, `Padding`, or `BorderBrush`) — `CardContentControl` provides proper styling, elevation, and theming out of the box. Custom card layouts with full control over content via `ContentTemplate`. |
| metadata | {"author":"uno-platform","version":"3.6","category":"toolkit"} |
Card — always use CardContentControl. The Card control has rigid predefined slots (HeaderContent, SubHeaderContent, AvatarContent, etc.) that constrain layout. CardContentControl gives full layout freedom via ContentTemplate.Border with CornerRadius to wrap content. This is the most common Border anti-pattern in generated XAML and the parser flags it as GRD1102. Always use CardContentControl instead — it provides correct elevation, corner radius, theming, and accessibility automatically.GRD1102)If you find yourself writing a <Border> that meets all of the following, stop and rewrite it as utu:CardContentControl:
Border has children (it is not self-closing).CornerRadius to a non-zero value.Background, BorderBrush (with non-zero BorderThickness), or non-zero Padding.That's a card. <Border CornerRadius="8" Background="..." Padding="16">…</Border> is a card written the wrong way.
<!-- WRONG: Border-as-card (the parser will report GRD1102) -->
<Border CornerRadius="8"
Background="{ThemeResource SurfaceBrush}"
Padding="16">
<StackPanel Spacing="8">
<TextBlock Text="Title"/>
<TextBlock Text="Body"/>
</StackPanel>
</Border>
<!-- CORRECT: utu:CardContentControl -->
<utu:CardContentControl Style="{StaticResource ElevatedCardContentControlStyle}">
<utu:CardContentControl.ContentTemplate>
<DataTemplate>
<StackPanel Padding="16" Spacing="8">
<TextBlock Text="Title"/>
<TextBlock Text="Body"/>
</StackPanel>
</DataTemplate>
</utu:CardContentControl.ContentTemplate>
</utu:CardContentControl>
Border is still correctBorder is the right choice for: dividers (<Border Height="1" Background="..."/>), thin separators, simple background fills with no rounded corners, image/content clipping with CornerRadius alone (no Background/Padding/BorderBrush+BorderThickness), and layout primitives inside a ControlTemplate. The grader specifically targets the card-shaped combination above; plain layout borders are unaffected.
Docs lookup: call
uno_platform_docs_search(...)first, thenuno_platform_docs_fetch(sourcePath="…")using thesourcePathfield from a result (a relative.mdpath; add the result'sanchorfor a section). Never pass a URL, a.htmllink, or a hand-built path.
uno_platform_docs_search("Uno Toolkit CardContentControl elevated filled outlined")
Primary documentation page:
external/uno.toolkit.ui/doc/controls/CardAndCardContentControl.mdFetch the page:
uno_platform_docs_fetch(sourcePath="external/uno.toolkit.ui/doc/controls/CardAndCardContentControl.md")
uno_platform_docs_search("CardContentControl howto walkthrough custom template")
Key page:
external/uno.toolkit.ui/doc/controls/walkthroughs/Card-and-CardContentControl.howto.mdCardContentControl — fully custom layout via ContentTemplate. This is the only card control you should use.xmlns:utu="using:Uno.Toolkit.UI"Card — it has predefined slots that limit layout flexibilityBorder as a card (CornerRadius + Background/Padding/BorderBrush) — the parser reports this as GRD1102; use CardContentControl insteadWhen CardContentControl is used inside an ItemsRepeater, ListView, or any other DataTemplate, you MUST set Content="{Binding}" on the CardContentControl. Without this, the inner ContentTemplate > DataTemplate has no DataContext and all bindings inside it resolve to null (rendering the card empty/invisible).
Content="{Binding}" on CardContentControl when it appears inside a DataTemplate{Binding Items[0].Label}) inside card templates — use ItemsSource with a nested ItemsRepeater insteadContentTemplate's inner DataTemplate inherits its DataContext only from the Content property — if Content is not bound, the inner template has no data<DataTemplate x:DataType="local:MenuItem">
<utu:CardContentControl Style="{StaticResource FilledCardContentControlStyle}"
Content="{Binding}">
<utu:CardContentControl.ContentTemplate>
<DataTemplate>
<TextBlock Text="{Binding Label}" />
</DataTemplate>
</utu:CardContentControl.ContentTemplate>
</utu:CardContentControl>
</DataTemplate>
<!-- ❌ WRONG: No Content="{Binding}" — inner DataTemplate has no DataContext -->
<DataTemplate x:DataType="local:MenuItem">
<utu:CardContentControl Style="{StaticResource FilledCardContentControlStyle}">
<utu:CardContentControl.ContentTemplate>
<DataTemplate>
<TextBlock Text="{Binding Label}" /> <!-- This resolves to null! -->
</DataTemplate>
</utu:CardContentControl.ContentTemplate>
</utu:CardContentControl>
</DataTemplate>
CardContentControl does NOT stretch by defaultCardContentControl sizes to its content. It will not fill the available width or height of its parent on its own, even inside a Grid cell or StackPanel slot that has space to spare. If you need the card to take all available space (a hero card, a full-width row, a column-filling pane), set the alignment explicitly on the CardContentControl itself:
<!-- Card fills its grid cell horizontally and vertically -->
<utu:CardContentControl Grid.Row="0"
Style="{StaticResource ElevatedCardContentControlStyle}"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch">
<utu:CardContentControl.ContentTemplate>
<DataTemplate>
<Grid Padding="16">
<!-- ... -->
</Grid>
</DataTemplate>
</utu:CardContentControl.ContentTemplate>
</utu:CardContentControl>
Rules of thumb:
HorizontalAlignment="Stretch".* row in a Grid): HorizontalAlignment="Stretch" and VerticalAlignment="Stretch".ItemsRepeater/ListView item template that should fill the item slot: HorizontalAlignment="Stretch".Setting Width/Height on the inner content of the ContentTemplate will not stretch the card — the alignment must be set on the CardContentControl element.
CardContentControl exposes three semantic style keys. Each design-theme provides its own concrete look; the key names are shared across themes.
| Style | When to use |
|---|---|
ElevatedCardContentControlStyle | Subtle z-axis elevation; default choice for surfaced content |
FilledCardContentControlStyle | Background tint, no elevation; use on busy backgrounds |
OutlinedCardContentControlStyle | Stroke instead of fill/elevation; secondary content |