Table.CellSpacing プロパティ

定義

テーブル内のセル間の間隔を取得または設定します。

public:
 property double CellSpacing { double get(); void set(double value); };
[System.ComponentModel.TypeConverter(typeof(System.Windows.LengthConverter))]
public double CellSpacing { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Windows.LengthConverter))>]
member this.CellSpacing : double with get, set
Public Property CellSpacing As Double

プロパティ値

テーブル内のセル間の間隔 (デバイスに依存しないピクセル単位)。

既定値は 2.0 です

属性

次の例では、0.35 センチメートルの CellSpacing を持つ単純な 2 x 3 テーブルを定義します。

<Table Background="Yellow" CellSpacing="0.35cm">
  <Table.Columns>
    <TableColumn /> <TableColumn /> <TableColumn />
  </Table.Columns>
  <TableRowGroup>
    <TableRow>
      <TableCell Background="Cyan">
        <Paragraph>Cell at Row 1 Column 1</Paragraph>
      </TableCell>
      <TableCell Background="Cyan">
        <Paragraph>Cell at Row 1 Column 2</Paragraph>
        <Paragraph>Cell at Row 1 Column 2</Paragraph>
      </TableCell>
      <TableCell Background="Cyan">
        <Paragraph>Cell at Row 1 Column 3</Paragraph>
      </TableCell>
    </TableRow>
    <TableRow>
      <TableCell Background="Cyan">
        <Paragraph>Cell at Row 2 Column 1</Paragraph>
      </TableCell>
      <TableCell Background="Cyan">
        <Paragraph>Cell at Row 2 Column 2</Paragraph>
      </TableCell>
      <TableCell Background="Cyan">
        <Paragraph>Cell at Row 2 Column 3</Paragraph>
      </TableCell>
    </TableRow>
  </TableRowGroup>
</Table>

次の図は、この例がどのようにレンダリングされるかを示しています。

スクリーンショット: [テーブル] セルの間隔

これに対し、次の図は、既定のセル間隔が 2 ピクセルの同じテーブルがどのようにレンダリングされるかを示しています。

スクリーンショット: [テーブル] セルの間隔

注釈

XAML 属性の使用法

<object property="double"/>
- or -
<object property="qualifiedDouble"/>

XAML 値

ダブルDouble

Double 以上でより小さいPositiveInfinity値の文字列形式。 非修飾値は、デバイスに依存しないピクセル単位で測定されます。 文字列に小数点を明示的に含める必要はありません。

qualifiedDouble 上記の double 値の後に、次のいずれかの単位指定子 ( pxincmpt) が続きます。

px (既定値) はデバイスに依存しない単位 (ユニットあたり 1/96 インチ) です

in はインチです。1in==96px

cm はセンチメートルです。1cm==(96/2.54) px

pt はポイントです。1pt==(96/72) px

依存関係プロパティ情報

品目 価値
識別子フィールド CellSpacingProperty
に設定されたメタデータ プロパティ true AffectsMeasure

適用対象