Share via


WPF のコンテンツ モデル

更新 : 2007 年 11 月

Windows Presentation Foundation (WPF) は、コンテンツの表示が主な目的である数多くのコントロール型やコントロールに似た型を提供するプレゼンテーション プラットフォームです。これらの型のコンテンツ モデルは、柔軟性が高い場合もあれば、時には非常に厳格な場合もあります。たとえば、コンテンツを 1 つしか格納しない型や複数の項目を格納できる型があります。また、コンテンツの種類には、テキスト、他のコントロール、特定の要素の集合があります。

このトピックでは、コントロール型とコントロールに似た型を継承階層に基づいて整理し、これらの型ファミリのコンテンツ モデルのクイック リファレンスを提供します。コンテンツ プロパティは、オブジェクトのコンテンツの格納に使用されるプロパティです。このトピックには、Windows SDK と共に配布される型のみが含まれています。

個々の型ファミリの詳細については、対応するコンテンツ モデルの概要を参照してください。

このトピックには次のセクションが含まれています。

  • ContentControl クラス
  • HeaderedContentControl クラス
  • ItemsControl クラス
  • HeaderedItemsControl クラス
  • Decorator クラス
  • Panel クラス
  • Adorner クラス
  • Flow Text クラス
  • TextBox クラス
  • TextBlock クラス
  • Shape クラス
  • 関連トピック

ContentControl クラス

説明

ContentControl は、Control の型の 1 つで、単一のコンテンツを含みます。

コンテンツ プロパティ

Content

コンテンツ モデル情報

Control コンテンツ モデルの概要

この型ファミリに属する型

Button, ButtonBase, CheckBox, ComboBoxItem, ContentControl, Frame, GridViewColumnHeader, GroupItem, Label, ListBoxItem, ListViewItem, NavigationWindow, RadioButton, RepeatButton, ScrollViewer, StatusBarItem, ToggleButton, ToolTip, UserControl, Window

ContentControl 型を格納できる型

ContentControl クラス、HeaderedContentControl クラス、ItemsControl クラス、HeaderedItemsControl クラス、Panel クラス、Decorator クラス、Adorner クラス

サブカテゴリ

HeaderedContentControl クラス

HeaderedContentControl クラス

説明

HeaderedContentControlContentControl の型の 1 つで、単一のコンテンツを格納し、Header も持っています。

コンテンツ プロパティ

Content, Header

コンテンツ モデル情報

Control コンテンツ モデルの概要

この型ファミリに属する型

Expander, GroupBox, HeaderedContentControl, TabItem

HeaderedContentControl 型を格納できる型

ContentControl クラス、HeaderedContentControl クラス、ItemsControl クラス、HeaderedItemsControl クラス、Panel クラス、Decorator クラス、Adorner クラス

ItemsControl クラス

説明

ItemsControl は、Control の型の 1 つで、文字列、オブジェクト、その他の要素などの項目を複数格納できます。

コンテンツ プロパティ

Items, ItemsSource

主要なコンテンツの種類

複数の項目 (文字列、オブジェクト、またはその他の要素)

コンテンツ モデル情報

Control コンテンツ モデルの概要

この型ファミリに属する型

Menu, MenuBase, ContextMenu, ComboBox, ItemsControl, ListBox, ListView, TabControl, TreeView, Selector, StatusBar

ItemsControl 型を格納できる型

ContentControl クラス、HeaderedContentControl クラス、ItemsControl クラス、HeaderedItemsControl クラス、Panel クラス、Decorator クラス、Adorner クラス

サブカテゴリ

HeaderedItemsControl クラス

HeaderedItemsControl クラス

説明

HeaderedItemsControlItemsControl の型の 1 つで、文字列、オブジェクト、その他の要素などの複数の項目を格納でき、ヘッダーも持っています。

コンテンツ プロパティ

Header, Items, ItemsSource

コンテンツ モデル情報

Control コンテンツ モデルの概要

この型ファミリに属する型

HeaderedItemsControl, MenuItem, TreeViewItem, ToolBar

HeaderedItemsControl 型を格納できる型

一般に、MenuItem オブジェクトは、Menu 要素の子要素として使用されます。TreeViewItem オブジェクトは、TreeView 要素の子要素として使用されます。ToolBar オブジェクトは、ToolBarTray の子要素として使用されます。

Decorator クラス

説明

DecoratorFrameworkElement の型の 1 つであり、単一の子 UIElement またはその周囲に効果を適用します。

コンテンツ プロパティ

Child

主要なコンテンツの種類

単一の UIElement

コンテンツ モデル情報

Decorator コンテンツ モデルの概要

この型ファミリに属する型

ButtonChrome, ClassicBorderDecorator, ListBoxChrome, SystemDropShadowChrome, Border, InkPresenter, BulletDecorator, Viewbox, AdornerDecorator

Decorator 型を格納できる型

ContentControl クラス、HeaderedContentControl クラス、ItemsControl クラス、HeaderedItemsControl クラス、Panel クラス、Decorator クラス、Adorner クラス

Panel クラス

説明

PanelFrameworkElement の型の 1 つで、子オブジェクトの配置および整列を行います。詳細については、「パネルの概要」を参照してください。

コンテンツ プロパティ

Children

主要なコンテンツの種類

1 つ以上の UIElement オブジェクト

コンテンツ モデル情報

Panel コンテンツ モデルの概要

この型ファミリに属する型

Canvas, DockPanel, Grid, TabPanel, ToolBarOverflowPanel, StackPanel, ToolBarPanel, UniformGrid, VirtualizingPanel, VirtualizingStackPanel, WrapPanel

Panel 型を格納できる型

ContentControl クラス、HeaderedContentControl クラス、ItemsControl クラス、HeaderedItemsControl クラス、Panel クラス、Decorator クラス、Adorner クラス

Adorner クラス

説明

Adorner は、単一の UIElement にバインドされる ("装飾する") FrameworkElement です。詳細については、「装飾の概要」を参照してください。

コンテンツ プロパティ

なし

主要なコンテンツの種類

なし

コンテンツ モデル情報

なし

この型ファミリに属する型

Adorner クラスは、独自の装飾を作成するためのフレームワークとして提供されています。Windows Presentation Foundation (WPF) では、実装済みの装飾は提供されていません。

Flow Text クラス

説明

TextElementFrameworkContentElement 型の 1 つで、テキストなどの TextElement オブジェクトを格納します。TextElement とその派生クラスは、フロー コンテンツを作成するために使用されます。フロー コンテンツの詳細については、「フロー ドキュメントの概要」を参照してください。

コンテンツ プロパティ

詳細については、「TextElement コンテンツ モデルの概要」を参照してください。

主要なコンテンツの種類

複数の項目 (文字列、オブジェクト、またはその他の要素)

コンテンツ モデル情報

TextElement コンテンツ モデルの概要

この型ファミリに属する型

AnchoredBlock, Block, BlockUIContainer, Bold, Figure, Floater, Hyperlink, Inline, InlineUIContainer, Italic, LineBreak, List, ListItem, Paragraph, Run, Section, Span, Table, Underline

Flow Text 型を格納できる型

FlowDocument クラス

TextBox クラス

説明

TextBox は、書式なしテキストの表示や編集に使用できるコントロールです。TextBox でサポートされるのは書式なしテキストのみです。アプリケーションでリッチ コンテンツのサポートが必要な場合は、RichTextBox を参照してください。

コンテンツ プロパティ

Text

主要なコンテンツの種類

文字列

コンテンツ モデル情報

TextBox コンテンツ モデルの概要

この型ファミリに属する型

TextBox

TextBox クラスを格納できる型

ContentControl クラス、HeaderedContentControl クラス、ItemsControl クラス、HeaderedItemsControl クラス、Panel クラス、Decorator クラス、Adorner クラス、Flow Text クラス

TextBlock クラス

説明

TextBlock は、少量のフロー コンテンツを表示する軽量コントロールです。

コンテンツ プロパティ

Inlines

コンテンツ モデル情報

TextBlock コンテンツ モデルの概要

この型ファミリに属する型

TextBlock

TextBlock クラスを格納できる型

ContentControl クラス、HeaderedContentControl クラス、ItemsControl クラス、HeaderedItemsControl クラス、Panel クラス、Decorator クラス、Adorner クラス、Flow Text クラス

Shape クラス

説明

ShapeFrameworkElement の型の 1 つで、幾何学図形を表示します。

コンテンツ プロパティ

なし

主要なコンテンツの種類

なし

コンテンツ モデル情報

なし

この型ファミリに属する型

Shape から派生する型の一覧については、Shape クラスのトピックを参照してください。

Shape 型を格納できる型

ContentControl クラス、HeaderedContentControl クラス、ItemsControl クラス、HeaderedItemsControl クラス、Panel クラス、Decorator クラス、Adorner クラス

参照

その他の技術情報

WPF の基礎