or
public class PolylineShapeTool : ToolBase, IMouseListener { private LineSegment _currentLineSegment; private PathFigure _currentPathFigure; private PathSegmentCollection _currentPathSegmentCollection; private RadDiagramShape _currentShape; public PolylineShapeTool() : base("PolylineShapeTool") { } private RadDiagram Diagram { get { return Graph as RadDiagram; } } public bool MouseDown(PointerArgs e) { return false; } public bool MouseDoubleClick(PointerArgs e) { return false; } public bool MouseMove(PointerArgs e) { if (IsActive && _currentShape != null) { if (_currentLineSegment != null) { var rect = CalculateRectFromBasePoint(e.TransformedPoint); _currentLineSegment.Point = e.TransformedPoint; _currentShape.Width = rect.Width; _currentShape.Height = rect.Height; } return true; } return false; } public bool MouseUp(PointerArgs e) { if (IsActive) { _currentLineSegment = new LineSegment { Point = e.TransformedPoint }; if (_currentPathSegmentCollection == null) { _currentPathSegmentCollection = new PathSegmentCollection(); _currentPathFigure = new PathFigure { StartPoint = e.TransformedPoint, Segments = _currentPathSegmentCollection, IsFilled = false, IsClosed = false }; var pathGeometry = new PathGeometry { Figures = new PathFigureCollection { _currentPathFigure } }; _currentShape = new RadDiagramShape { Geometry = pathGeometry}; Diagram.AddShape(_currentShape); } _currentPathSegmentCollection.Add(_currentLineSegment); _currentPathFigure.Segments = _currentPathSegmentCollection; return true; } return false; } protected override void OnDeactivated() { base.OnDeactivated(); _currentShape = null; _currentLineSegment = null; _currentPathFigure = null; _currentPathSegmentCollection = null; } private Rect CalculateRectFromBasePoint(Point transformedPoint) { var width = Math.Abs(_currentShape.X - transformedPoint.X); var height = Math.Abs(_currentShape.Y - transformedPoint.Y); var x = Math.Min(_currentShape.X, transformedPoint.X); var y = Math.Min(_currentShape.Y, transformedPoint.Y); return new Rect(x, y, width, height); } }

<telerik:GridViewDataColumn.Header> <CheckBox IsChecked="{Binding DataContext.MyProperty, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"/></telerik:GridViewDataColumn.Header>