Table.CellSpacing Propriété
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Obtient ou définit la quantité d’espacement entre les cellules d’un tableau.
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
Valeur de propriété
Quantité d’espacement entre les cellules d’un tableau, en pixels indépendants de l’appareil.
La valeur par défaut est 2.0.
- Attributs
Exemples
L’exemple suivant définit une table simple de 2 x 3 avec une CellSpacing valeur de 0,35 centimètre.
<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>
La figure suivante montre comment cet exemple s’affiche.
Espacement des cellules de table
En revanche, la figure suivante montre comment le même tableau s’affiche avec un espacement de cellule par défaut de 2 pixels.
Espacement des cellules de table
Remarques
Utilisation des attributs XAML
<object property="double"/>
- or -
<object property="qualifiedDouble"/>
Valeurs XAML
DoubleDouble
Représentation sous forme de chaîne d’une Double valeur égale ou supérieure à 0,0 , mais inférieure à PositiveInfinity. Une valeur non qualifiée est mesurée en pixels indépendants de l’appareil. Les chaînes n’ont pas besoin d’inclure explicitement les décimales.
qualifiedDouble Valeur double comme décrit ci-dessus, suivie de l’un des spécificateurs d’unités suivants : px, , incm, pt.
px (valeur par défaut) est des unités indépendantes de l’appareil (1/96e pouce par unité)
in est pouces ; 1in==96px
cm est en centimètres ; 1cm==(96/2.54) px
pt est des points ; 1pt==(96/72) px
Informations sur les propriétés de dépendance
| Élément | Valeur |
|---|---|
| Champ d’identificateur | CellSpacingProperty |
Propriétés de métadonnées définies sur true |
AffectsMeasure |