티스토리 뷰
<ListBox DockPanel.Dock="Top" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel IsItemsHost="True"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListBoxItem">
<Border BorderThickness="1" BorderBrush="SlateGray" Margin="2">
<ContentPresenter ContentSource="Content"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ListBox.ItemContainerStyle>
</ListBox>
ListBox는 개별 아이템을 ListBoxItem으로 감싸는데, 그 ListBoxItem의 Template을 스타일로 건드려서 감싸는 부분을 수정할 수 있다.
ItemsControl로도 가능할진 모르겠다. WrapPanel을 감싸려했는데 Template이 없다고 안 되고..
'지식저장소 > 개발' 카테고리의 다른 글
React Hooks를 사용할 이유 (6) | 2019.06.19 |
---|---|
깃 3-way merge IntelliJ 설정 (0) | 2019.03.19 |
코틀린 Restricted suspension의 의미 (0) | 2019.02.12 |
정규식 .*(dot star)의 동작 (0) | 2018.12.10 |
하스켈 위키 타입 패밀리 번역 (0) | 2016.11.24 |
- Total
- Today
- Yesterday
- gram
- intellisense
- hooks
- Authentication
- Code Snippet
- Kotlin
- SHAREX
- Rust
- IntelliJ
- Qt5
- coroutine
- software compraison
- CLion
- MSVC 2017 RC
- game design
- novel review
- getch()
- WSL
- C/C++
- Deemo
- React
- MSVC2013
- Haskell
- V3 Lite
- Notion
- error highlighting
- JWT
- C++11
- MSVC
- Windows Defender
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |