# TXDrawingCore Class

> The TXDrawingCore class provides properties and methods to specify the type and format of shapes rendered as a Scalable Vector Graphics (SVG). The class implements the System.ComponentModel.INotifyPropertyChanged interface. Changes to the shapes that require updating the view can be listend via the Changed event. The following describes only the properties, methods and events defined through the TXDrawingCore class. For a list of properties, methods and events inherited from the System.ComponentModel.INotifyPropertyChanged interface see the .NET Framework reference.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Class
- **Introduced:** 33.0
- **Namespace:** `TXTextControl.Drawing`
- **Package:** `TXTextControl.TextControl.WPF.SDK` (assembly `TXDrawing.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXDrawing.dll` from the setup
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl.Drawing > TXDrawingCore Class
- **2751 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/llms-full.txt

---

### Description

The TXDrawingCore class provides properties and methods to specify the type and format of [shapes](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/shape/llms-full.txt) [rendered](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/getsvg-method/llms-full.txt) as a Scalable Vector Graphics (SVG). The class implements the `System.ComponentModel.INotifyPropertyChanged` interface. Changes to the shapes that require updating the view can be listend via the [Changed](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/changed-event/llms-full.txt) event. The following describes only the properties, methods and events defined through the `TXDrawingCore` class. For a list of properties, methods and events inherited from the `System.ComponentModel.INotifyPropertyChanged` interface see the .NET Framework reference.

### Syntax

```csharp
public class TXDrawingCore
```

```vbnet
Public Class TXDrawingCore
```

### Examples

The following example creates a TXDrawing Core instance and configures its back color setting for a document workflow.

```csharp
TXTextControl.Drawing.TXDrawingCore tXDrawingCore = new();
tXDrawingCore.BackColor = System.Drawing.Color.LightSteelBlue;
```

```vbnet
Dim tXDrawingCore As New TXTextControl.Drawing.TXDrawingCore()
tXDrawingCore.BackColor = System.Drawing.Color.LightSteelBlue
```

---

## In This Section

- [TXDrawingCore.AdaptBounds Event](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/adaptbounds-event/llms-full.txt): Indicates that the visible bounds of the displayed shapes have been changed (by changing the shape's angle, outline width, yellow adjust rectangles or the canvas' border width) in so far that the canvas requires an update of its bounds. The event always raises if the visible bounds exceed the canvas' bounds. If IsCanvasVisible is false, AdaptBounds is also raised if considering changes lead to a decreasing of the visible shape bounds. The event handler receives an argument of type EventArgs containing data related to this event.
- [TXDrawingCore.BackColor Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/backcolor-property/llms-full.txt): Gets or sets the back color of the canvas. The default value is System.Drawing.Transparent.
- [TXDrawingCore.BorderColor Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/bordercolor-property/llms-full.txt): Gets or sets the border line color of the canvas. The default value is System.Drawing.Black.
- [TXDrawingCore.BorderWidth Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/borderwidth-property/llms-full.txt): Gets or sets the border line width of the canvas. The value is given in twips. The default value is 0.
- [TXDrawingCore.CanCopy Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/cancopy-property/llms-full.txt): Informs whether shapes are selected which can be copied to the internal clipboard.
- [TXDrawingCore.CanPaste Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/canpaste-property/llms-full.txt): Informs whether the internal clipboard contains shapes that can be pasted into the canvas.
- [TXDrawingCore.CanRedo Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/canredo-property/llms-full.txt): Informs whether an operation can be re-done using the Redo method.
- [TXDrawingCore.CanUndo Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/canundo-property/llms-full.txt): Gets a value indicating whether the user can undo the previous TXDrawingCore operation.
- [TXDrawingCore.Changed Event](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/changed-event/llms-full.txt): Indicates that the number or formatting of the displayed shapes has been changed. The event handler receives an argument of type EventArgs.
- [TXDrawingCore.ClearUndo Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/clearundo-method/llms-full.txt): Clears the undo buffer of the TXDrawingCore instance.
- [TXDrawingCore Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/constructor/llms-full.txt): Initializes a new instance of the TXDrawingCore class.
- [TXDrawingCore.Copy Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/copy-method/llms-full.txt): Copies the current selected shapes to the Clipboard.
- [TXDrawingCore.Cut Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/cut-method/llms-full.txt): Moves the current selected shapes to the Clipboard.
- [TXDrawingCore.GetSVG Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/getsvg-method/llms-full.txt): Creates and returns a string representing a Scalable Vector Graphics (SVG) of the shapes.
- [TXDrawingCore.IsCanvasVisible Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/iscanvasvisible-property/llms-full.txt): Gets a value whether the cavas is visible or not. It is visible if it contains only one shape, the shape's CanFitToCanvas property is set to false, its AutoSize property is set to true and the TXDrawingCore's BorderWidth property is 0. If the property's value is false the TXDrawingCore instance can be thought of as a representation of the containing shape where bounds changes of the TXDrawingCore lead to considering changes of the shape and vise versa.
- [TXDrawingCore.Load Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/load-method/llms-full.txt): Loads shapes data into the canvas from a specified object of type System.IO.Stream.
- [TXDrawingCore.Paste Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/paste-method/llms-full.txt): Pastes the content of the clipboard into the canvas.
- [TXDrawingCore.Redo Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/redo-method/llms-full.txt): Redoes the last TXDrawingCore operation.
- [TXDrawingCore.Save Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/save-method/llms-full.txt): Saves the shapes data to the given object of type System.IO.Stream.
- [TXDrawingCore.SelectAll Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/selectall-method/llms-full.txt): Selects all shapes.
- [TXDrawingCore.Selection Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/selection-property/llms-full.txt): Gets an object of type Drawing.Selection that represents the current selected shapes inside the canvas.
- [TXDrawingCore.ShapeCreated Event](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/shapecreated-event/llms-full.txt): Occurs when a new shape has been created. It occurs, when a shape has been inserted in the TXDrawingCore's shapes collection by pasting or using the shape collection's Add method. The event handler receives an argument of type ShapeEventArgs containing data related to this event.
- [TXDrawingCore.ShapeDeleted Event](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/shapedeleted-event/llms-full.txt): Occurs when a shape has been deleted from the TXDrawingCore's shapes collection. It occurs by cutting or using the shape collection's Remove, RemoveAt or Clear method. The event handler receives an argument of type ShapeEventArgs containing data related to this event.
- [TXDrawingCore.ShapeDeselected Event](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/shapedeselected-event/llms-full.txt): Occurs when a shape has been deselected. It occurs by removing a shape from the TXDrawingCore.Selection.Shapes property or, if the number of selected shapes is greater than 0, clicking on a location inside the canvas where no shape is located. The event handler receives an argument of type ShapeEventArgs containing data related to this event.
- [TXDrawingCore.ShapeFlipped Event](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/shapeflipped-event/llms-full.txt): Occurs when a shape has been flipped. It occurs by using the shape's Flip property. The event handler receives an argument of type ShapeEventArgs containing data related to this event.
- [TXDrawingCore.ShapeFormatChanged Event](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/shapeformatchanged-event/llms-full.txt): Occurs when shape formatting attributes have been changed. The corresponding attributes are the shape's ShapeFill, ShapeOutline are Type properties. The event handler receives an argument of type ShapeEventArgs containing data related to this event.
- [TXDrawingCore.ShapeMoved Event](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/shapemoved-event/llms-full.txt): Occurs when a shape has been moved. The event handler receives an argument of type ShapeEventArgs containing data related to this event.
- [TXDrawingCore.Shapes Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/shapes-property/llms-full.txt): Gets an object of type ShapeCollection that represents those shapes which are displayed inside the canvas.
- [TXDrawingCore.ShapeSelected Event](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/shapeselected-event/llms-full.txt): Occurs when a shape has been selected. It occurs by using the select all method or changing the TXDrawingCore.Selection.Shapes property . The event handler receives an argument of type ShapeEventArgs containing data related to this event.
- [TXDrawingCore.ShapeSized Event](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/shapesized-event/llms-full.txt): Occurs when a shape has been sized. The event handler receives an argument of type ShapeEventArgs containing data related to this event.
- [TXDrawingCore.Size Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/size-property/llms-full.txt): Gets or sets the size of the canvas.
- [TXDrawingCore.SizeToContent Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/sizetocontent-method/llms-full.txt): If any changes of the the displayed shapes' visible bounds require an adaption of the canvas bounds, its size and/or location is expanded respectively decreased by the considering value of the considering shape's side(s). The method returns an array of doubles which represent the effected alteration for each canvas side (left, top, right, bottom) in Twips.
- [TXDrawingCore.Undo Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/undo-method/llms-full.txt): Undoes the last TXDrawingCore's edit operation.
- [TXDrawingCore.ViewChanged Event](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/viewchanged-event/llms-full.txt): Occurs selection changing have caused the view to change. The event handler receives an argument of type ViewChangedEventArgs containing data related to this event.

---

## Nearby

- **Previous:** [ShapeType Enumeration](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/shapetype/enumeration/llms-full.txt)
- **Next:** [TXDrawingCore.AdaptBounds Event](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/adaptbounds-event/llms-full.txt)
