Skip to content
converting-html-css-to-wpf-xaml logo

HTML/CSS → WPF XAML 변환 가이드

converting-html-css-to-wpf-xaml

Converts HTML/CSS to WPF CustomControl XAML with correct patterns and common pitfall solutions. Use when transforming web designs to WPF, converting CSS animations to Storyboards, implementing CSS border-radius clipping, CSS pseudo-elements (::before/::after), or CSS transforms in XAML.

SKILL.md

Full skill instructions

HTML/​CSS → WPF XAML 변환 가이드

CSS → WPF 핵심 매핑 테이블

CSSWPF 구현 방법참조
overflow: hidden + border-radiusBorder.Clip + RectangleGeometry (RadiusX/​Y + MultiBinding)clipping.md
position: absolute (회전 요소)Canvas + Canvas.Left/​Toplayout.md
animation-duration: 3sDuration="0:0:3" 인라인animation.md
height: 130% (회전 요소)Converter로 동적 계산 (배율 2.0)transform.md
::before, ::afterCanvas 내 요소, 선언 순서로 z-orderlayout.md
z-index선언 순서 또는 Panel.ZIndexlayout.md
중앙 정렬 콘텐츠Canvas 밖 Grid에서 Alignment 적용layout.md
spacingMaring 속성으로 대체-

핵심 규칙 요약

1. Duration은 항상 인라인

<!-- ✅ -->
<DoubleAnimation Duration="0:0:3" />
<!-- ❌ StaticResource 바인딩 불가 -->

2. 둥근 모서리 클리핑은 Border.Clip + RectangleGeometry

<Border CornerRadius="20">
    <Border.Clip>
        <RectangleGeometry RadiusX="20" RadiusY="20">
            <RectangleGeometry.Rect>
                <MultiBinding Converter="{x:Static local:SizeToRectConverter.Instance}">
                    <Binding Path="ActualWidth" RelativeSource="{RelativeSource AncestorType=Border}" />
                    <Binding Path="ActualHeight" RelativeSource="{RelativeSource AncestorType=Border}" />
                </​MultiBinding>
            </​RectangleGeometry.Rect>
        </​RectangleGeometry>
    </​Border.Clip>
</​Border>

3. 회전 요소는 Canvas 내 배치

<Canvas>
    <Rectangle Canvas.Left="45" Canvas.Top="{Binding ...}" RenderTransformOrigin="0.5,0.5">
        <Rectangle.RenderTransform>
            <RotateTransform Angle="0" />
        </​Rectangle.RenderTransform>
    </​Rectangle>
</​Canvas>

4. ContentPresenter는 Canvas 밖 Grid에 배치

<Grid>
    <Canvas><!-- 회전 요소들 --></​Canvas>
    <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
</​Grid>

참조 문서

파일내용
references/​index.md전체 케이스 목록 (빠른 검색용)
references/​clipping.md클리핑 관련 실수 (Grid.Clip, OpacityMask, ClipToBounds)
references/​animation.md애니메이션/​Duration 관련
references/​layout.mdCanvas/​Grid/정렬, pseudo-element 관련
references/​transform.md회전/높이 계산 관련
references/​converters.md필수 Converter 패턴
references/​case-template.md새 케이스 추가용 템플릿

More Other skills

Delegate independent tasks to specialized agents working concurrently with isolated context.

295.4K 206.3K
View

Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.

179.7K 100.1K
View

Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.

179.7K 89.5K
View

A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).

179.7K 76.1K
View

Fundamental design principles for writing maintainable, testable Python code.

40.2K 21.9K
View

Modern responsive layouts using container queries, fluid typography, CSS Grid, and mobile-first strategies.

40.2K 20K
View

Generate Playwright tests from scenarios using interactive browser exploration and validation.

39.7K 18.2K
View

Modern React state management with Redux Toolkit, Zustand, Jotai, and React Query for every state category.

40.2K 14.7K
View

GDPR-compliant data handling with consent management, data subject rights, and privacy controls.

40.2K 14.3K
View

Python error handling patterns including input validation, exception hierarchies, and partial failure handling. Use when implementing validation logic, designing exception strategies, handling batch processing failures, or building robust APIs.

40.2K 13.5K
View

Detailed multi-file refactor planning with safety checks and rollback guidance.

39.7K 13K
View