最終更新:2020-04-06 (月) 16:52:11 (1840d)
System.Windows.Controls.ItemsControl
Top / System.Windows.Controls.ItemsControl
- 複数の子要素(Itemsプロパティ)を持つ
- 子要素はUIElementオブジェクト
ItemsControl.Items?
派生クラス
- System.Windows.Controls.HeaderedItemsControl?
- System.Windows.Controls.TreeView?
- System.Windows.Controls.Primitives.DataGridCellsPresenter?
- System.Windows.Controls.Primitives.DataGridColumnHeadersPresenter?
- System.Windows.Controls.Primitives.MenuBase?
- System.Windows.Controls.Primitives.Selector
- System.Windows.Controls.Primitives.StatusBar?
- System.Windows.Controls.Ribbon.RibbonContextualTabGroupItemsControl?
- System.Windows.Controls.Ribbon.RibbonControlGroup?
- System.Windows.Controls.Ribbon.RibbonGallery?
- System.Windows.Controls.Ribbon.RibbonQuickAccessToolBar?
- System.Windows.Controls.Ribbon.RibbonTabHeaderItemsControl?
外観
Control.Template (型:System.Windows.Controls.ControlTemplate)
- コントロール自体のカスタマイズ
<ItemsControl.Template> <ControlTemplate TargetType="ItemsControl"> <Border BorderThickness="1" BorderBrush="Black" Background="Azure"> <ItemsPresenter Margin="10" /> </Border> </ControlTemplate> </ItemsControl.Template>
ItemsControl.ItemsPanel (型:System.Windows.Controls.ItemsPanelTemplate)
- コレクション項目をどのようにレイアウトするかを決定
<ItemsControl.ItemsPanel> <ItemsPanelTemplate> <!-- (1) <StackPanel Orientation="Vertical" /> --> <!-- (2) <WrapPanel Orientation="Horizontal" /> --> <!-- (3) <Grid /> --> </ItemsPanelTemplate> </ItemsControl.ItemsPanel>
ItemsControl.ItemContainerStyle?
- コレクションのコンテナのカスタマイズ
ItemsControl.ItemTemplate (型:System.Windows.DataTemplate)
- 項目ごとの外観のカスタマイズ
<ItemsControl.ItemTemplate> <DataTemplate> <TextBlock Margin="5"> <Run Text="No." /> <Run Text="{Binding Number}" /> <LineBreak /> <Run Text="Name:" /> <Run Text="{Binding Name}" FontSize="15" /> </TextBlock> </DataTemplate> </ItemsControl.ItemTemplate>
関連
- System.Windows.Controls.Menu?
- System.Windows.Controls.MenuBase?
- System.Windows.Controls.ContextMenu?
- System.Windows.Controls.ComboBox
- System.Windows.Controls.ListBox
- System.Windows.Controls.ListView
- System.Windows.Controls.TabControl?
- System.Windows.Controls.TreeView?
- System.Windows.Controls.Selector?
- System.Windows.Controls.StatusBar?