# Slide Properties and Methods

Per-slide options: background colour or image, hidden slides, slide numbers.

```csharp
using NetCorePpt;                  // PptxGen, Slide
using NetCorePpt.CoreInterfaces;   // option objects: TextProps* / ShapeProps / ImageProps / TableProps / HAlign / VAlign ...
using NetCorePpt.CoreEnums;        // ShapeType, ChartType, MediaType, ShadowType, BulletType, DashType, SCHEME_COLORS ...
using TableRow = System.Collections.Generic.List<NetCorePpt.CoreInterfaces.TableCell>;
```

## Slide Properties

| Option | Type | Default | Description | Possible Values |
| --- | --- | --- | --- | --- |
| `background` | `BackgroundProps` | `FFFFFF` | background color/images | add background color or image [`DataOrPathProps`](types.md#datapath-props-dataorpathprops) and/or [`ShapeFillProps`](types.md#shape-fill-props-shapefillprops) |
| `color` | string | `000000` | default text color | hex color or [scheme color](shapes-and-schemes.md). |
| `hidden` | boolean | `false` | whether slide is hidden | Ex: `slide.hidden = true` |
| autoPagedSlides | PresSlide[] |  | all slides created by autopaging | Contains slides automatically created when content (e.g. a table) overflows the current slide using autoPage:true |
| `slideNumber` | [`SlideNumberProps`](types.md#slide-number-props-slidenumberprops) |  | slide number props | (see examples below) |

## Full Examples

### Example: Background/Foreground

**PptxGenJS · javascript**

```javascript
// EX: Use several methods to set a background
slide.background = { color: "F1F1F1" }; // Solid color
slide.background = { color: "FF3399", transparency: 50 }; // hex fill color with transparency of 50%
slide.background = { data: "image/png;base64,ABC[...]123" }; // image: base64 data
slide.background = { path: "https://some.url/image.jpg" }; // image: url
```

**NetCorePpt · C#**

```csharp
// EX: Use several methods to set a background
slide.background = new BackgroundProps { color = "F1F1F1" };                       // Solid color
slide.background = new BackgroundProps { color = "FF3399", transparency = 50 };    // hex fill color with transparency of 50%
slide.background = new BackgroundProps { data = "image/png;base64,ABC[...]123" };  // image: base64 data
slide.background = new BackgroundProps { path = "https://some.url/image.jpg" };    // image: url
```

**PptxGenJS · javascript**

```javascript
// EX: Set slide default font color
slide.color = "696969";
```

**NetCorePpt · C#**

```csharp
// EX: Set slide default font color
slide.color = "696969";
```

### Example: Slide Number

**PptxGenJS · javascript**

```javascript
// EX: Add a Slide Number at a given location
slide.slideNumber = { x: 1.0, y: "90%" };

// EX: Styled Slide Numbers
slide.slideNumber = { x: 1.0, y: "95%", fontFace: "Courier", fontSize: 32, color: "CF0101" };
```

**NetCorePpt · C#**

```csharp
// EX: Add a Slide Number at a given location
slide.slideNumber = new SlideNumberProps { x = 1.0, y = "90%" };

// EX: Styled Slide Numbers (SlideNumberProps derives from TextBaseProps)
slide.slideNumber = new SlideNumberProps {
    x = 1.0, y = "95%", fontFace = "Courier", fontSize = 32, color = "CF0101",
};
```
