Telerik Forums
UI for WinForms Forum
1 answer
124 views

Hello Telerik staff,

First of all, allow me to thank you for all the help your team has provided me. After implementing custom shapes in my RadDiagram, I discovered that I require to create a connection that allows me to link other connections to it (please, see attached image). I have perused the forum and the documentation, but I have not found any clue that could lead me to a solution.

Thank you very much.

Nadya | Tech Support Engineer
Telerik team
 answered on 12 Nov 2020
1 answer
164 views

Dear Telerik staff,

I am trying to insert a customized connection using the default ConnectorTool into my RadDiagram. However, this seems near impossible because the library does not expose a method to do that, as WPF does (https://www.telerik.com/forums/using-connection-tool-to-draw-custom-connection). Consequently, I decided to create a custom tool, but it is not working. I need a tool that provides the same functionality as the ConnectorTool, but that employs a customized connection that contains its own visual traits and a set of extra properties/variables.
My current code is as follows:

public class CustomTool : ToolBase, IMouseListener
    {
        public CustomTool(string name) : base(name)
        {
            this.Name = name;
        }
        IConnection currentConnection = null;
        Point lastPoint;
        public virtual bool MouseDown(PointerArgs e)
        {
            try
            {
                if (this.ToolService.ActiveTool != null && this.ToolService.ActiveTool.Name.Equals(this.Name))
                {
                     
                    HitTestService hitTestService = MainMenu.getDiagram().ServiceLocator.GetService<IHitTestService>() as HitTestService;
                    
                    if (this.currentConnection == null)
                    {
                        this.currentConnection = new CustomRadDiagramConnection(System.Drawing.Color.FromArgb(150, 45, 90), "test");
                         
                        if (hitTestService.ShapeUnderMouse != null)
                        {
                            this.currentConnection.Source = hitTestService.ShapeUnderMouse; 
                        }
                        this.currentConnection.StartPoint = e.TransformedPoint;
                         
                        this.currentConnection.EndPoint = this.lastPoint = e.TransformedPoint;
                        this.Graph.Items.Add((RadElement)this.currentConnection);
                        hitTestService = null;
                        return true;
                    }
                }
            }
            catch (NullReferenceException)
            {
                MessageBox.Show("Not working");
            }
            return true;
        }
 
        protected override void OnActivated()
        {
            base.OnActivated();
            this.lastPoint = new Point(0, 0);
            this.currentConnection = null;
        }
 
        protected override void OnDeactivated()
        {
            base.OnDeactivated();
            this.ToolService.ActivateTool("Pointer Tool");
            this.Graph.AddConnection(currentConnection);
            //this.Graph.Items.Remove((RadElement)this.currentConnection);
            this.currentConnection = null;
        }
 
        public virtual bool MouseMove(PointerArgs e)
        {
 
            if (this.currentConnection != null && this.IsActive)
            {
                this.currentConnection.EndPoint = this.lastPoint = e.TransformedPoint;
                this.currentConnection.Update();
                return true;
            }
            return false;
        }
        public virtual bool MouseUp(PointerArgs e)
        {
            HitTestService hitTestService = MainMenu.getDiagram().ServiceLocator.GetService<IHitTestService>() as HitTestService;
            if (IsActive)
            {
                if (hitTestService.ShapeUnderMouse != null)
                {
                    this.currentConnection.Target = hitTestService.ShapeUnderMouse;
                }
                this.currentConnection.EndPoint = this.lastPoint;
                this.currentConnection.Update();
                this.DeactivateTool();
                hitTestService = null;
                return true;
            }
            return false;
        }
        public bool MouseDoubleClick(PointerArgs e)
        {
            return false;
        }
    }

 

Thank you

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 12 Nov 2020
4 answers
160 views

I am planning to include two types of radDiagramContainerShape in my project:

1) The first one holds all the shapes that will be created and inserted into the Diagram; hence, it must fill the whole area of the diagram. In other words, it should behave as if it were docked to its parent (radDiagram) in dock.fill mode.
2) The second one will be created each time a "special" shape is instantiated. Then, that shape will be added and locked to it. This container should behave normally with any other shape, but the special one. The special shape must remain fixed to the container.

I have been reviewing the accessible properties and events, but I have not found a way of achieving it yet.

Thank you for your help!

 

Tom
Top achievements
Rank 1
Veteran
 answered on 11 Nov 2020
1 answer
189 views
How can i add Toogle Button Element in design form?
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 11 Nov 2020
4 answers
495 views

Hi, How can I disable grid scrolling associated with a panning gesture? I would like it just to work when using the grid's scrollbar. So, while a user is panning, e.g. panning vertically up, I do not want the grid to scroll.

Thanks!

Alan
Top achievements
Rank 1
 answered on 10 Nov 2020
3 answers
190 views

Hi, how can I set the default value for Draw Shape and Draw Text element. For example I set the default value border thickness=3 , shape color = red, shape fill = transparent. For now, all the setting I need to set at the DrawShapeDialog. Can I hide this pop up? So that user can straight forward to make a draw.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 10 Nov 2020
4 answers
131 views
The documentation makes no mention of a footer in a virtual grid.  Is it possible to put lets's say a label or some other control under the grid - to give a record count after filtering, for example.
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 09 Nov 2020
2 answers
613 views

Hi,

 

The default color of the checkbox in the grid is beige or grey. How do I change the color of the background to white?

I use: Office2013light

Attached image.


Eusebio
Top achievements
Rank 1
Veteran
 answered on 09 Nov 2020
2 answers
133 views

Hi, excel have a very nice feature that, when on a pivot, if you double click a cell, it shows the full dataset which is bound to the same cell.

It is possible to achieve the same by using the radpivotgrid?

For example we need to know, when a user double clicks on a cell which is the result of an aggregate (sum, average etc..) what are the rows on the dataset which generated that sum.

Best

Andrea

Andrea
Top achievements
Rank 1
 answered on 06 Nov 2020
2 answers
454 views

I am struggling with an feature that I'd like to implement.

Basically, I'd like a visual cue that indicates the current value of the range as end user changes the value of the range.

My TrackBar has 1440 minutes and I'd like to display what minute they're on without it being guess work.

I attached a screenshot of my implementation of the track bar.

Ideally, I'd like to display a label underneath the TrackbarThumbElement that would update as the value updates and then disappear. Any ideas how I might be able to update the UI with the current value of the range as the end user is manipulating the control?

James
Top achievements
Rank 1
 answered on 04 Nov 2020
Narrow your results
Selected tags
Tags
GridView
General Discussions
Scheduler and Reminder
Treeview
Dock
RibbonBar
Themes and Visual Style Builder
ChartView
Calendar, DateTimePicker, TimePicker and Clock
DropDownList
Buttons, RadioButton, CheckBox, etc
ListView
ComboBox and ListBox (obsolete as of Q2 2010)
Form
Chart (obsolete as of Q1 2013)
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
PropertyGrid
Menu
RichTextBox (obsolete as of Q3 2014 SP1)
Panelbar (obsolete as of Q2 2010)
PivotGrid and PivotFieldList
Tabstrip (obsolete as of Q2 2010)
MaskedEditBox
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
ShapedForm
SyntaxEditor
Wizard
CollapsiblePanel
TextBoxControl
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
Styling
Barcode
PopupEditor
RibbonForm
TaskBoard
NavigationView
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
SplashScreen
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?