2016-11-15から1日間の記事一覧
WPFのItemsControlはすごく強力だとおもいますよね ItemsControl.ItemsSourceにリストをバインドして、ItemTemplateで中身を定義すると自由なリストが簡単に作れるので一度使うと癖になります 簡単な例だとこんな感じ <ItemsControl ItemsSource="{Binding Numbers}"> <ItemsControl.ItemTemplate> <DataTemplate> <StackPanel Orientation="Horizontal" Margin="5"> <TextBlock Text="{Binding}"/> </textblock></stackpanel></datatemplate></itemscontrol.itemtemplate></itemscontrol>