# OdfStrokeDashPattern

An ODF dash pattern with up to two repeated dash lengths and a uniform gap.

Class 

`OfficeIMO.OpenDocument`

**Namespace**

`OfficeIMO.OpenDocument`

**Assembly**

`OfficeIMO.OpenDocument`

**Source revision**

`15caddadea70` with working tree changes

**Source**

[OdfStrokeDashPattern.cs:12](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Styles/OdfStrokeDashPattern.cs#L12)

**Modifiers**

sealed

An ODF dash pattern with up to two repeated dash lengths and a uniform gap.

## Inheritance

- object
- OdfStrokeDashPattern

## Usage

Explore 2 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 1

- Property [OdfStrokeDash.Pattern](/api/open-document/officeimo-opendocument-odfstrokedash/#property-pattern)

### Accepted by parameters 1

- Method [OdfStyleRepository.CreateStrokeDash](/api/open-document/officeimo-opendocument-odfstylerepository/#method-createstrokedash-string-officeimo-opendocument-odfstrokedashpattern) parameter `pattern`

Filter members 

Show inherited

## Constructors

`public OdfStrokeDashPattern(int dashCount, OdfLength dashLength, OdfLength distance, int secondDashCount = 0, OdfLength? secondDashLength = null, bool roundCaps = false)` [#](#constructor-ctor-int32-officeimo-opendocument-odflength-officeimo-opendocument-odflength-int32-nullable-officeimo-opendocument-odflength-boolean)

[OdfStrokeDashPattern.cs:12](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Styles/OdfStrokeDashPattern.cs#L12)

Creates a pattern. Lengths may use absolute ODF units or percentages of stroke width.

Parameters

**dashCount int required**

First sequence count, from zero to 1024.

**dashLength OfficeIMO.OpenDocument.OdfLength required**

First sequence dash length; zero is allowed.

**distance OfficeIMO.OpenDocument.OdfLength required**

Positive gap between dashes, excluding caps.

**secondDashCount int = 0 optional**

Second sequence count; the total count must be between one and 1024.

**secondDashLength OfficeIMO.OpenDocument.OdfLength? = null optional**

Second sequence dash length, required when its count is positive.

**roundCaps bool = false optional**

Use round caps when the shape has no explicit cap override.

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public int DashCount { get; }` [#](#property-dashcount)

[OdfStrokeDashPattern.cs:26](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Styles/OdfStrokeDashPattern.cs#L26)

Number of dashes in the first sequence.

`public OdfLength DashLength { get; }` [#](#property-dashlength)

[OdfStrokeDashPattern.cs:28](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Styles/OdfStrokeDashPattern.cs#L28)

First dash length, excluding caps.

`public OdfLength Distance { get; }` [#](#property-distance)

[OdfStrokeDashPattern.cs:30](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Styles/OdfStrokeDashPattern.cs#L30)

Gap between adjacent dashes, excluding caps.

`public int SecondDashCount { get; }` [#](#property-seconddashcount)

[OdfStrokeDashPattern.cs:32](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Styles/OdfStrokeDashPattern.cs#L32)

Number of dashes in the second sequence.

`public OdfLength? SecondDashLength { get; }` [#](#property-seconddashlength)

[OdfStrokeDashPattern.cs:34](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Styles/OdfStrokeDashPattern.cs#L34)

Second dash length, excluding caps.

`public bool RoundCaps { get; }` [#](#property-roundcaps)

[OdfStrokeDashPattern.cs:36](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Styles/OdfStrokeDashPattern.cs#L36)

Whether the definition supplies round caps when the shape does not override them.

<!-- PowerForge markdown artifact sha256:BEED6CF2B6F5EDA3479E695C8090712AAEF44F7D1D26971A5A90C2597A21B7EE -->
