<!-- Generated by tools/SharpCell.Grid.Docs from the XML documentation comments. Do not edit; run the tool with 'generate'. -->

# SheetTabs

```csharp
public class SheetTabs : UserControl
```

Namespace `SharpCell.Grid.Avalonia` · package `SharpCell.Grid.Avalonia`

Excel's sheet tabs for a [SpreadsheetView](SharpCell.Grid.Avalonia.SpreadsheetView.md): a tab for each sheet of the view's workbook, the shown one highlighted. Clicking a tab shows its sheet, and the + button adds a sheet, as in Excel. Put it under the view, as Excel does.

## Constructors

<a id="ctor"></a>
### SheetTabs()

```csharp
public SheetTabs()
```

Tabs for no view; set [SheetTabs.View](SharpCell.Grid.Avalonia.SheetTabs.md#view) to connect them.

## Properties

<a id="sheetnames"></a>
### SheetNames

```csharp
public IReadOnlyList<string> SheetNames { get; }
```

The names on the tabs, in the workbook's order.

<a id="view"></a>
### View

```csharp
public SpreadsheetView? View { get; set; }
```

The view whose workbook's sheets the tabs show and switch.

## Methods

<a id="addsheet"></a>
### AddSheet()

```csharp
public Worksheet? AddSheet()
```

Adds a sheet after the others, named as Excel names a new sheet (`Sheet2`, `Sheet3`, the first number free), and shows it. Null when the view is read-only or has no sheet.

<a id="refresh"></a>
### Refresh()

```csharp
public void Refresh()
```

Shows the tabs again from the workbook's sheets, after sheets were added in code.
