TX Text Control .NET for WPF

DrawingEventArgs Class

Class|Introduced in 23.0
Namespace
TXTextControl.DataVisualization
Package
TXTextControl.TextControl.WPF.SDK from the private NuGet feed or Text Control Offline Packages
Assembly
TXTextControl.dll
Install
dotnet add package TXTextControl.TextControl.WPF.SDK .NET 8 and later. For .NET Framework, reference TXTextControl.dll from the setup.
Inherits
  1. EventArgs
  2. DrawingEventArgs

Description

The DrawingEventArgs class provides data for all events that occur with drawings. These are the TextControl.DrawingCreated, TextControl.DrawingDeleted, TextControl.DrawingClicked, TextControl.DrawingDoubleClicked, TextControl.DrawingRightClicked, TextControl.DrawingMoved TextControl.DrawingSelected, TextControl.DrawingDeselected TextControl.DrawingActivated, TextControl.DrawingDeactivated and TextControl.DrawingSized events.

Syntax

public class DrawingEventArgs : EventArgs

Examples

The following example uses DrawingEventArgs.DrawingFrame while handling DrawingClicked.

textControl.DrawingClicked += (_, e) =>
{
    if (e.DrawingFrame != null)
    {
        e.DrawingFrame.DescriptiveText = "Quarterly sales by region";
    }
};

Members

Properties

PropertyDescription
DrawingFrameGets an object that represents the drawing which causes the event. It is of the type DataVisualization.DrawingFrame.