# VisioShapeStyle

Reusable visual style for Visio shapes.

Class 

`OfficeIMO.Visio`

**Namespace**

`OfficeIMO.Visio`

**Assembly**

`OfficeIMO.Visio`

**Source revision**

`273d35d5ba8a` with working tree changes

**Source**

[VisioShapeStyle.cs:16](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Visio/Styles/VisioShapeStyle.cs#L16)

**Modifiers**

sealed

Reusable visual style for Visio shapes.

## Inheritance

- object
- VisioShapeStyle

## Usage

Explore 21 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 12

- Property [VisioCalloutOptions.ShapeStyle](/api/visio/officeimo-visio-visiocalloutoptions/#property-shapestyle)
- Property [VisioContainerOptions.ShapeStyle](/api/visio/officeimo-visio-visiocontaineroptions/#property-shapestyle)
- Property [VisioDataGraphicItem.BadgeStyle](/api/visio/officeimo-visio-visiodatagraphicitem/#property-badgestyle)
- Property [VisioDataGraphicItem.BarBackgroundStyle](/api/visio/officeimo-visio-visiodatagraphicitem/#property-barbackgroundstyle)
- Property [VisioDataGraphicItem.BarFillStyle](/api/visio/officeimo-visio-visiodatagraphicitem/#property-barfillstyle)
- Method [VisioShapeStyle.Clone](/api/visio/officeimo-visio-visioshapestyle/#method-clone)
- Property [VisioStyleTheme.Container](/api/visio/officeimo-visio-visiostyletheme/#property-container)
- Property [VisioStyleTheme.Decision](/api/visio/officeimo-visio-visiostyletheme/#property-decision)
- Property [VisioStyleTheme.Emphasis](/api/visio/officeimo-visio-visiostyletheme/#property-emphasis)
- Property [VisioStyleTheme.Marker](/api/visio/officeimo-visio-visiostyletheme/#property-marker)
- Property [VisioStyleTheme.Primary](/api/visio/officeimo-visio-visiostyletheme/#property-primary)
- Property [VisioStyleTheme.Success](/api/visio/officeimo-visio-visiostyletheme/#property-success)

### Accepted by parameters 9

- Method [VisioGraphDiagramBuilder.NodeStyle](/api/visio/officeimo-visio-diagrams-visiographdiagrambuilder/#method-nodestyle-string-action-officeimo-visio-visioshapestyle) parameter `configure`
- Method [VisioGraphDiagramBuilder.NodeStyle](/api/visio/officeimo-visio-diagrams-visiographdiagrambuilder/#method-nodestyle-string-officeimo-visio-visioshapestyle) parameter `style`
- Method [VisioDataGraphic.Badge](/api/visio/officeimo-visio-visiodatagraphic/#method-badge-string-string-officeimo-visio-visioshapestyle) parameter `style`
- Method [VisioDataGraphic.Bar](/api/visio/officeimo-visio-visiodatagraphic/#method-bar-string-double-double-string-officeimo-visio-visioshapestyle) parameter `fillStyle`
- Method [VisioPage.StyleContainer](/api/visio/officeimo-visio-visiopage/#method-stylecontainer-string-officeimo-visio-visioshapestyle-boolean) parameter `style`
- Extension method [VisioShape.ApplyStyle](/api/visio/officeimo-visio-visioshape/#extension-applystyle-officeimo-visio-visioshape-officeimo-visio-visioshapestyle) parameter `style`
- Extension method [VisioShapeSelection.ApplyStyle](/api/visio/officeimo-visio-visioshapeselection/#extension-applystyle-officeimo-visio-visioshapeselection-officeimo-visio-visioshapestyle) parameter `style`
- Method [VisioShapeSelection.Style](/api/visio/officeimo-visio-visioshapeselection/#method-style-officeimo-visio-visioshapestyle) parameter `style`
- Method [VisioStyleExtensions.ApplyStyle](/api/visio/officeimo-visio-visiostyleextensions/#method-applystyle-officeimo-visio-visioshape-officeimo-visio-visioshapestyle) parameter `style`

Filter members 

Show inherited

## Constructors

`public VisioShapeStyle(OfficeColor fillColor, OfficeColor lineColor, double lineWeight = 0.0138889, int linePattern = 1, int fillPattern = 1)` [#](#constructor-ctor-officeimo-officecolor-officeimo-officecolor-double-int32-int32)

[VisioShapeStyle.cs:16](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Visio/Styles/VisioShapeStyle.cs#L16)

Initializes a new shape style.

Parameters

**fillColor OfficeIMO.OfficeColor required**

Fill color.

**lineColor OfficeIMO.OfficeColor required**

Line color.

**lineWeight double = 0.0138889 optional**

Line weight in inches.

**linePattern int = 1 optional**

Line pattern index.

**fillPattern int = 1 optional**

Fill pattern index.

## Methods

`public void ApplyTo(VisioShape shape)` [#](#method-applyto-officeimo-visio-visioshape)

[VisioShapeStyle.cs:52](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Visio/Styles/VisioShapeStyle.cs#L52)

Applies this style to a shape.

Parameters

**shape OfficeIMO.Visio.VisioShape required**

Shape to update.

`public VisioShapeStyle Clone()` [#](#method-clone)

[VisioShapeStyle.cs:44](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Visio/Styles/VisioShapeStyle.cs#L44)

Creates a detached copy of this style.

Returns

`VisioShapeStyle`

## 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 OfficeColor FillColor { get; set; }` [#](#property-fillcolor)

[VisioShapeStyle.cs:25](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Visio/Styles/VisioShapeStyle.cs#L25)

Fill color.

`public OfficeColor LineColor { get; set; }` [#](#property-linecolor)

[VisioShapeStyle.cs:28](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Visio/Styles/VisioShapeStyle.cs#L28)

Line color.

`public double LineWeight { get; set; }` [#](#property-lineweight)

[VisioShapeStyle.cs:31](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Visio/Styles/VisioShapeStyle.cs#L31)

Line weight in inches.

`public int LinePattern { get; set; }` [#](#property-linepattern)

[VisioShapeStyle.cs:34](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Visio/Styles/VisioShapeStyle.cs#L34)

Line pattern index.

`public int FillPattern { get; set; }` [#](#property-fillpattern)

[VisioShapeStyle.cs:37](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Visio/Styles/VisioShapeStyle.cs#L37)

Fill pattern index.

`public VisioTextStyle? TextStyle { get; set; }` [#](#property-textstyle)

[VisioShapeStyle.cs:40](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Visio/Styles/VisioShapeStyle.cs#L40)

Optional text style to apply with this shape style.

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