# VisioProtection

ShapeSheet protection cells that control how a shape or connector can be edited in Visio.

Class 

`OfficeIMO.Visio`

**Namespace**

`OfficeIMO.Visio`

**Assembly**

`OfficeIMO.Visio`

**Source revision**

`273d35d5ba8a` with working tree changes

**Source**

[VisioShapeProtection.cs:102](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Visio/VisioShapeProtection.cs#L102)

ShapeSheet protection cells that control how a shape or connector can be edited in Visio.

## Inheritance

- object
- VisioProtection

## Derived Types

- [VisioShapeProtection](/api/visio/officeimo-visio-visioshapeprotection/)

## Usage

Explore 24 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 17

- Property [VisioConnector.Protection](/api/visio/officeimo-visio-visioconnector/#property-protection)
- Method [VisioProtection.Clear](/api/visio/officeimo-visio-visioprotection/#method-clear)
- Method [VisioProtection.Deletion](/api/visio/officeimo-visio-visioprotection/#method-deletion-boolean)
- Method [VisioProtection.Endpoints](/api/visio/officeimo-visio-visioprotection/#method-endpoints-boolean)
- Method [VisioProtection.Formatting](/api/visio/officeimo-visio-visioprotection/#method-formatting-boolean)
- Method [VisioProtection.Position](/api/visio/officeimo-visio-visioprotection/#method-position-boolean)
- Method [VisioProtection.Selection](/api/visio/officeimo-visio-visioprotection/#method-selection-boolean)
- Method [VisioProtection.Size](/api/visio/officeimo-visio-visioprotection/#method-size-boolean)
- Method [VisioProtection.Text](/api/visio/officeimo-visio-visioprotection/#method-text-boolean)
- Method [VisioShapeProtection.Clear](/api/visio/officeimo-visio-visioshapeprotection/#method-clear)
- Method [VisioShapeProtection.Deletion](/api/visio/officeimo-visio-visioshapeprotection/#method-deletion-boolean)
- Method [VisioShapeProtection.Endpoints](/api/visio/officeimo-visio-visioshapeprotection/#method-endpoints-boolean)
- Method [VisioShapeProtection.Formatting](/api/visio/officeimo-visio-visioshapeprotection/#method-formatting-boolean)
- Method [VisioShapeProtection.Position](/api/visio/officeimo-visio-visioshapeprotection/#method-position-boolean)
- Method [VisioShapeProtection.Selection](/api/visio/officeimo-visio-visioshapeprotection/#method-selection-boolean)
- Method [VisioShapeProtection.Size](/api/visio/officeimo-visio-visioshapeprotection/#method-size-boolean)
- Method [VisioShapeProtection.Text](/api/visio/officeimo-visio-visioshapeprotection/#method-text-boolean)

### Accepted by parameters 7

- Method [VisioConnector.Protect](/api/visio/officeimo-visio-visioconnector/#method-protect-action-officeimo-visio-visioprotection) parameter `configure`
- Method [VisioConnectorSelection.Protect](/api/visio/officeimo-visio-visioconnectorselection/#method-protect-action-officeimo-visio-visioprotection) parameter `configure`
- Extension method [VisioPage.ConnectorsWithProtection](/api/visio/officeimo-visio-visiopage/#extension-connectorswithprotection-officeimo-visio-visiopage-func-officeimo-visio-visioprotection-system-boolean) parameter `predicate`
- Extension method [VisioPage.SelectConnectorsWithProtection](/api/visio/officeimo-visio-visiopage/#extension-selectconnectorswithprotection-officeimo-visio-visiopage-func-officeimo-visio-visioprotection-system-boolean) parameter `predicate`
- Method [VisioPage.ConnectorsWithProtection](/api/visio/officeimo-visio-visiopage/#method-connectorswithprotection-func-officeimo-visio-visioprotection-system-boolean-action-officeimo-visio-visioconnectorselection) parameter `predicate`
- Method [VisioPageQueryExtensions.ConnectorsWithProtection](/api/visio/officeimo-visio-visiopagequeryextensions/#method-connectorswithprotection-officeimo-visio-visiopage-func-officeimo-visio-visioprotection-system-boolean) parameter `predicate`
- Method [VisioPageQueryExtensions.SelectConnectorsWithProtection](/api/visio/officeimo-visio-visiopagequeryextensions/#method-selectconnectorswithprotection-officeimo-visio-visiopage-func-officeimo-visio-visioprotection-system-boolean) parameter `predicate`

Filter members 

Show inherited

## Constructors

`public VisioProtection()` [#](#constructor-ctor)

## Methods

`public VisioProtection Clear()` [#](#method-clear)

[VisioShapeProtection.cs:161](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Visio/VisioShapeProtection.cs#L161)

Clears every explicit protection setting.

Returns

`VisioProtection`

`public VisioProtection Deletion(bool locked = true)` [#](#method-deletion-boolean)

[VisioShapeProtection.cs:128](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Visio/VisioShapeProtection.cs#L128)

Locks or unlocks deletion.

Parameters

**locked bool = true optional**

Returns

`VisioProtection`

`public VisioProtection Endpoints(bool locked = true)` [#](#method-endpoints-boolean)

[VisioShapeProtection.cs:152](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Visio/VisioShapeProtection.cs#L152)

Locks or unlocks connector endpoints.

Parameters

**locked bool = true optional**

Returns

`VisioProtection`

`public VisioProtection Formatting(bool locked = true)` [#](#method-formatting-boolean)

[VisioShapeProtection.cs:136](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Visio/VisioShapeProtection.cs#L136)

Locks or unlocks formatting.

Parameters

**locked bool = true optional**

Returns

`VisioProtection`

`public VisioProtection Position(bool locked = true)` [#](#method-position-boolean)

[VisioShapeProtection.cs:111](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Visio/VisioShapeProtection.cs#L111)

Locks or unlocks shape position.

Parameters

**locked bool = true optional**

Returns

`VisioProtection`

`public VisioProtection Selection(bool locked = true)` [#](#method-selection-boolean)

[VisioShapeProtection.cs:144](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Visio/VisioShapeProtection.cs#L144)

Locks or unlocks selection.

Parameters

**locked bool = true optional**

Returns

`VisioProtection`

`public VisioProtection Size(bool locked = true)` [#](#method-size-boolean)

[VisioShapeProtection.cs:102](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Visio/VisioShapeProtection.cs#L102)

Locks or unlocks shape size.

Parameters

**locked bool = true optional**

Returns

`VisioProtection`

`public VisioProtection Text(bool locked = true)` [#](#method-text-boolean)

[VisioShapeProtection.cs:120](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Visio/VisioShapeProtection.cs#L120)

Locks or unlocks text editing.

Parameters

**locked bool = true optional**

Returns

`VisioProtection`

## 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 bool? LockWidth { get; set; }` [#](#property-lockwidth)

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

Locks the shape width.

`public bool? LockHeight { get; set; }` [#](#property-lockheight)

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

Locks the shape height.

`public bool? LockAspect { get; set; }` [#](#property-lockaspect)

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

Locks the shape aspect ratio.

`public bool? LockMoveX { get; set; }` [#](#property-lockmovex)

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

Locks horizontal movement.

`public bool? LockMoveY { get; set; }` [#](#property-lockmovey)

[VisioShapeProtection.cs:43](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Visio/VisioShapeProtection.cs#L43)

Locks vertical movement.

`public bool? LockDelete { get; set; }` [#](#property-lockdelete)

[VisioShapeProtection.cs:46](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Visio/VisioShapeProtection.cs#L46)

Prevents deleting the shape.

`public bool? LockTextEdit { get; set; }` [#](#property-locktextedit)

[VisioShapeProtection.cs:49](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Visio/VisioShapeProtection.cs#L49)

Prevents editing the shape text.

`public bool? LockFormat { get; set; }` [#](#property-lockformat)

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

Prevents formatting changes.

`public bool? LockGroup { get; set; }` [#](#property-lockgroup)

[VisioShapeProtection.cs:55](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Visio/VisioShapeProtection.cs#L55)

Prevents grouping the shape.

`public bool? LockUngroup { get; set; }` [#](#property-lockungroup)

[VisioShapeProtection.cs:58](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Visio/VisioShapeProtection.cs#L58)

Prevents ungrouping the shape.

`public bool? LockSelect { get; set; }` [#](#property-lockselect)

[VisioShapeProtection.cs:61](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Visio/VisioShapeProtection.cs#L61)

Prevents selecting the shape.

`public bool? LockRotate { get; set; }` [#](#property-lockrotate)

[VisioShapeProtection.cs:64](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Visio/VisioShapeProtection.cs#L64)

Locks shape rotation.

`public bool? LockCrop { get; set; }` [#](#property-lockcrop)

[VisioShapeProtection.cs:67](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Visio/VisioShapeProtection.cs#L67)

Locks cropping operations.

`public bool? LockVtxEdit { get; set; }` [#](#property-lockvtxedit)

[VisioShapeProtection.cs:70](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Visio/VisioShapeProtection.cs#L70)

Locks vertex editing.

`public bool? LockBegin { get; set; }` [#](#property-lockbegin)

[VisioShapeProtection.cs:73](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Visio/VisioShapeProtection.cs#L73)

Locks the begin endpoint for one-dimensional shapes.

`public bool? LockEnd { get; set; }` [#](#property-lockend)

[VisioShapeProtection.cs:76](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Visio/VisioShapeProtection.cs#L76)

Locks the end endpoint for one-dimensional shapes.

`public bool? LockCalcWH { get; set; }` [#](#property-lockcalcwh)

[VisioShapeProtection.cs:79](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Visio/VisioShapeProtection.cs#L79)

Locks recalculation of width and height.

`public bool? LockCustProp { get; set; }` [#](#property-lockcustprop)

[VisioShapeProtection.cs:82](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Visio/VisioShapeProtection.cs#L82)

Locks custom properties / Shape Data editing.

`public bool? LockFromGroupFormat { get; set; }` [#](#property-lockfromgroupformat)

[VisioShapeProtection.cs:85](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Visio/VisioShapeProtection.cs#L85)

Locks formatting inherited from a group.

`public bool? LockThemeColors { get; set; }` [#](#property-lockthemecolors)

[VisioShapeProtection.cs:88](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Visio/VisioShapeProtection.cs#L88)

Locks theme color changes.

`public bool? LockThemeEffects { get; set; }` [#](#property-lockthemeeffects)

[VisioShapeProtection.cs:91](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Visio/VisioShapeProtection.cs#L91)

Locks theme effect changes.

`public bool HasAnyLocks { get; }` [#](#property-hasanylocks)

[VisioShapeProtection.cs:96](https://github.com/EvotecIT/OfficeIMO/blob/273d35d5ba8ab8ce3f6f1238631241c0cea26d14/OfficeIMO.Visio/VisioShapeProtection.cs#L96)

Gets whether any protection cell has been explicitly set.

<!-- PowerForge markdown artifact sha256:90A9E4F90CA5DFFD105F77AD522AC145E96BB13137EDCDCF35F62CE4F6C2BBE0 -->
