Telerik Forums
UI for WPF Forum
0 answers
9 views

Hello,
When RectSelectionMode is set to "full," a diagram shape is only selected if the entire shape is within the selection area.
However, for connections, even if only a part of the connection is within the selection area, it gets selected in this mode.
I would like connections to be selected only when their entire length is included in the selection area, just like diagram shapes.
Is it possible to modify RectSelectionMode to achieve this?
If there is any method to enable this behavior, please let me know.

Jieun
Top achievements
Rank 1
 asked on 23 Apr 2026
0 answers
230 views

Hi there,

I recently upgraded from 2024.3.821 to 2025.4.1111 and I found some weird issue when deserializing raddiagram xml.  Attached please see two SerializationInfo strings. Both of them can be deserialized in 2024.3.821 but the one named "diagram serialization info_bad" is not able to be deserialized completely in 2025.4.1111. I found the RadDiagramShape with Id = "7cc7b6c3-1606-453d-a9ab-ebc0bd53b207" is causing issue so I removed it from the SerializationInfo Info and named it "diagram serialization info_good". 

Please help me to check why the RadDiagramShape Id = "7cc7b6c3-1606-453d-a9ab-ebc0bd53b207" will cause issue in 2025.43.1111 since it didn't give me any error or exception.

my code is simple as:

SerializationInfo e1 = SerializationInfo.CreateDiagramInfo(serializationInfo);
RadDiagram.Deserialize(e1);

Thank you

Chao-An
Top achievements
Rank 1
 asked on 18 Dec 2025
1 answer
95 views

when the RadDiagramShape background is set to  LinearGradientBrush or RadialGradientBrush ,if the GradientStop color is opacity color ,

After exporting the PDF, the transparency effect cannot be displayed,like this from SDK Sample(ExportToPDF_WPF project):

<telerik:RadDiagramShape.Background>
<RadialGradientBrush Center=" 0.5, 0.5" GradientOrigin="0.5, 0.5" RadiusX="0.5" RadiusY="0.5">
<RadialGradientBrush.GradientStops>
                                               <GradientStop Offset="0" Color="#4DE44F0F" />
                                               <GradientStop Offset="0.5" Color="#7E1513B9" />
                                               <GradientStop Offset="1" Color="#960FB814" />
</RadialGradientBrush.GradientStops>
</RadialGradientBrush>
</telerik:RadDiagramShape.Background>

UI display effect:

The effect after exporting PDF:

Martin Ivanov
Telerik team
 answered on 14 Oct 2025
0 answers
58 views
When adding a graphic to the diagram, adjust its width and height, and set the border to 2(or other value)

After exporting the PDF, the thickness of each border is inconsistent.At the same time, the thickness of the border is also different from the set value,I feel like the border has been stretched and enlarged as a whole,You can test Microsoft Visio, it doesn't have this issue.

      Test code use the sample sdk project:ExportToPDF_WPF

Please refer to the image

wu
Top achievements
Rank 1
Veteran
 updated question on 25 Jul 2025
0 answers
89 views

Hello Telerik Team,

I'm working with the RadDiagram control and have a scenario where I need certain RadDiagramShapes to display their AdditionalContent persistently â€“ meaning the content should remain visible even when the shape is not selected. Additionally, I want to achieve this behavior and customize the AdditionalContent's styling purely through MVVM binding approaches.

Could you please provide guidance or code examples demonstrating:

  1. How to keep AdditionalContent visible for specific shapes regardless of selection state.
  2. How to dynamically style AdditionalContent (e.g., colors, templates) using MVVM properties.

Any suggestions for binding strategies or relevant Shape/Style properties would be greatly appreciated. Thank you!

Joey
Top achievements
Rank 1
 asked on 16 Apr 2025
0 answers
134 views
I am using the RadDiagram component inside a WPF application for a sketching software. The default behavior of the RadDiagram is to enable movement of the diagram with the Ctrl + Left click and drag shortcut. I want to enable the program to also work with Middle mouse button click and drag. Currently, I am using custom RadDiagram tools, which derive from their base classes. For example, MyPanningTool: 


using System;
using System.Windows.Input;
using XXX.Core.Models.EventArgs;
using Telerik.Windows.Diagrams.Core;

namespace XXX.XXX.Presentation.Tools
{
    internal class MyPanningTool : PanningTool
    {
        private const string PanningToolName = "Panning Tool";
        private SelectionMode _selectionMode;
        private ToolService _toolService;

        public MyPanningTool()
        {
            Cursor = DiagramCursors.Dragging;
        }

        private void ActivatePanningTool()
        {
            _toolService ??= Graph.ServiceLocator.GetService<IToolService>() as ToolService;
            _toolService?.ActivateTool(PanningToolName);
        }

        private void ActivatePointerTool()
        {
            _toolService ??= Graph.ServiceLocator.GetService<IToolService>() as ToolService;
            _toolService?.ActivateTool("Pointer Tool");
        }

        public override bool KeyDown(KeyArgs key)
        {
            if (!IsActive) return false;
            base.KeyDown(key);

            if (key.Key != Key.Enter && key.Key != Key.Escape && !ToolService.IsControlDown)
            {
                ActivatePanningTool();
                return false;
            }

            return false;
        }

        /// <inheritdoc />
        public override bool MouseDown(PointerArgs e)
        {
            if (IsActive)
            {
                _selectionMode = Graph.SelectionMode;
                Graph.SelectionMode = SelectionMode.None;
            }

            if (ToolService.IsControlDown || Mouse.MiddleButton == MouseButtonState.Pressed)
            {
                //ActivateTool();
                //ActivatePanningTool();
                return base.MouseDown(e);
            }
                
            return IsActive && base.MouseDown(e);
        }

        /// <inheritdoc />
        public override bool MouseMove(PointerArgs e)
        {
            if (ToolService.IsControlDown || Mouse.MiddleButton == MouseButtonState.Pressed)
            {
                return base.MouseMove(e);
            }
            return IsActive && base.MouseMove(e);
        }

        /// <inheritdoc />
        public override bool MouseUp(PointerArgs e)
        {
            if (!IsActive) return false;

            Graph.SelectionMode = _selectionMode;

            try
            {
                base.MouseUp(e);
            }
            catch
            {
                // ignored
            }



            if (ToolService.IsControlDown || Mouse.MiddleButton == MouseButtonState.Pressed) return base.MouseUp(e);

            ActivatePointerTool();
            ToolChangedEvent?.Invoke(null, new ToolChangedEventArgs("Pointer Tool"));
            return true;
        }

        public static event EventHandler<ToolChangedEventArgs> ToolChangedEvent;
    }
}

I've tried to capture the Middle mouse click event on the RadDiagram and transfer them to the Panning tool Mouse click and and Move events, but this doesn't seem to do the trick.
Pavel
Top achievements
Rank 1
 updated question on 26 Nov 2024
0 answers
115 views

Can you please help me to creating  a custom connect.

Can you give me a small example as shown in below picture.

Parth
Top achievements
Rank 1
Iron
Iron
 updated question on 02 Oct 2024
0 answers
86 views
can you please send me a sample project to creating diagram dynamic layout algorithm using very minimum connection overlpping.
Parth
Top achievements
Rank 1
Iron
Iron
 asked on 24 Sep 2024
0 answers
99 views

can you please help me to created diagram show in image for using created custom edge for "avoid connection overlap" used in Graph  dynamically.

 

Parth
Top achievements
Rank 1
Iron
Iron
 updated question on 11 Sep 2024
1 answer
109 views
Can you please help me to Download Diagram in .svg file.
Martin Ivanov
Telerik team
 answered on 03 Sep 2024
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?