Telerik Forums
UI for WinForms Forum
1 answer
25 views

Hi, 

 

I add shape page. In shape of text can I do change color of text at third line similar like picture? If I choose third line of text change color can first and second text no change color? How I write it. Because user want to change or add any of text color.

Thanks.

Dinko | Tech Support Engineer
Telerik team
 answered on 04 Dec 2023
1 answer
20 views
HI.
I trying to create a Connection in RadDiagram  With VB.net
My use case is adding a handler to detect mouse right click on the connection. Although the following code does not give an error, it does not work either.

Blow is my simple test code.

Imports Telerik.WinControls
Imports Telerik.WinControls.UI

Public Class RadForm1

    Private Sub RadForm1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Dim con As New RadDiagramConnection
        con.Name = "Telerik_Connection"
        con.StartPoint = New Point(10, 10)
        con.EndPoint = New Point(100, 100)
        con.StrokeThickness = 5
        con.BackColor = Color.Blue
        AddHandler con.MouseClick, AddressOf Con_click

    End Sub

    Private Sub Con_click(ByVal sender As Object, ByVal e As MouseEventArgs)
        If e.Button = MouseButtons.Right Then
            Me.Text = sender.name
        End If
    End Sub
End Class


Dinko | Tech Support Engineer
Telerik team
 answered on 10 Oct 2023
2 answers
60 views

Hello,

I have question about diagram zooming behavior. I would expect standard behavior, when zooming by mouse wheel, diagram should zoom with keeping point behind mouse cursor on the same position, zooming by toolbar buttons (programatically by ZoomIn / ZoomOut methods) should do the same, but keeping center point on the same position. It's almost working like this, but the first zoom (either by mouse or by buttons) do some strange first "move", and then it works like expected.

I set zoom/position on startup to fit main shape to all control space, also I added button "Zoom Fit" that makes the same. And I think that control "remembers" some other zoom center and it does the first zoom by this point. Next zooms work like expected. I have attached my test project. I have also attached animations of behavior as attachments (I tried to add it to question as images, but I couldn't submit question with them, it have always ended with error).

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 21 Sep 2023
1 answer
86 views

Hello,  I am adding a 15mb image to the background of a RadDiagramShape.  The problem I am running into is the RadDiagram eats up 1gb of memory every time I open the form.  Eventually if I don't call GC.Collect the Image.FromStream blows up due to a memory limit.  I have traced it back to the RadDiagram utilizing a ton of memory.  The question I have is what performance considerations should I be looking at with the control?  I included the steps I am taking to add in the image.  

Thanks in advance!
Brian

 

                uiMap.DiagramElement.IsBackgroundSurfaceVisible = false;
                uiMap.SelectionMode = Telerik.Windows.Diagrams.Core.SelectionMode.None;

                RadDiagramShape backgroundImage = new RadDiagramShape()
                {
                    Name = "Image"
                };


                backgroundImage.IsConnectorsManipulationEnabled = false;
                backgroundImage.IsRotationEnabled = false;
                backgroundImage.IsResizingEnabled = false;
                backgroundImage.IsDraggingEnabled = false;
                backgroundImage.CaptureOnMouseDown = false;
                backgroundImage.IsEnabled = false;
                backgroundImage.IsFocusable = false;
                backgroundImage.IsHitTestVisible = false;
                backgroundImage.ShouldHandleMouseInput = false;
                backgroundImage.Shape = new Telerik.WinControls.RoundRectShape(0);
                backgroundImage.DiagramShapeElement.Image = floorplan;
                backgroundImage.Width = floorplan.Width;
                backgroundImage.Height = floorplan.Height;
                backgroundImage.ShouldHandleMouseInput = false;
                backgroundImage.NotifyParentOnMouseInput = false;
                backgroundImage.CaptureOnMouseDown = false;

               uiMap.AddShape(backgroundImage);

                Telerik.Windows.Diagrams.Core.ToolService toolService = uiMap.ServiceLocator.GetService<Telerik.Windows.Diagrams.Core.IToolService>() as Telerik.Windows.Diagrams.Core.ToolService;

                if (toolService != null)
                    toolService.ToolList[0] = new CustomPanningTool();

                uiMap.ActiveTool = Telerik.Windows.Diagrams.Core.MouseTool.PanTool;

 

                                
Dinko | Tech Support Engineer
Telerik team
 answered on 01 Dec 2022
1 answer
81 views

Hello Telerik,

 

Sorry, is it possible to create something like (I'm not really sure what it calls) flow or line with nodes or checkpoint ? Maybe like this image

 

Or like, if we played an adventure game, an on that game there was a map that shows where we were and what was the next quest or city, or anything.


Thanks before.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 26 Oct 2022
1 answer
46 views

I'm currently working on a project where we are using a RadDiagram to dynamically display and plan a distribution hall. Here we are using different elements/shapes in the diagram to represent storage shelves and spaces/spots in those shelves. We want to draw these shelves and their spots either horizontally from left to right or vertically from bottom to top. We want to do this by first drawing the shelve and its spots horizontally and then rotate the shelve using a custom RotationService, that rotates the shelve group programatically. This however has an unwanted side effect, which can be inspected in the provided demo app and below:

The rotation via the custom RotationService appears to move the shelve in the diagram to a "random" position depending on the RadDiagram zoom and scroll position. So a shelve can be drawn and rotated as expected in the first initialization of the diagram.

Initial Diagram creation:

If the diagrams zoom level and scroll position isn't changed a shelve can be selected and rotated using the switch button. This also works as expected.

Shelve rotation without zoom:

If however the zoom of the diagram is changed or the scroll position is changed, following a rotation of a shelve or the redraw of the whole diagram using the refresh button, the vertically rotated shape is moved to a differen position.
If the rotation of the shelve is repeated multiple times the postion of the rotated shape appears to migrate to a point in the diagram. If the shelve reaches this point it will start to rotate properly again, without further change in position.

Shelve rotation with zoom:

Refresh with zoom and different scroll positions:

As seen above the rotated shelve is drawn in different positions each time the diagrams zoom or scroll is changed. Is this due to a wrong implementation of the RotationService as seen in the Demo_Project or is it due to a bug?

 

 

Dinko | Tech Support Engineer
Telerik team
 answered on 21 Oct 2022
1 answer
66 views


hello, I want to show a form in settings pane, but the form is much larger, so  I need to resize it . But

radDiagram1.DiagramElement.SettingsPane.Size doesn't work. How can I make this work ? Thanks

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 06 Sep 2022
1 answer
160 views
I'm trying to show a topology structure of a hardware system via radDiagram, however, didn't find the way to display a image inside a RadDiagramShape.  Someone help me plz?
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 22 Aug 2022
1 answer
62 views

Hello,

how can I override New/Open/Save buttons actions in RadDiagramRibbonBar? I have found button properties, so I can add my event handlers. I have found also DisableDefaultSaveAction property. I set that property to true, but it disables only New and Save button actions, not Open button action. How can I disable also default Open button action? Also, why is it named '...SaveAction', when it disables also New action? I attached my test project for testing.

		private void MainForm_Load(object sender, EventArgs e)
		{
			//radDiagramRibbonBar1.buttonNew.Visibility = ElementVisibility.Collapsed;
			radDiagramRibbonBar1.DisableDefaultSaveAction = true;
			radDiagramRibbonBar1.buttonNew.Click += ButtonNew_Click;
			radDiagramRibbonBar1.buttonOpen.Click += ButtonOpen_Click;
			radDiagramRibbonBar1.buttonSave.Click += ButtonSave_Click;
		}

One more question, can I add my buttons / groups to ribbon bar also to main tab? I see I can add new tabs and buttons to them, is it possible to add also to main tab in a simple way? I don't know if I will need it, but it's interesting question.

I am starting to implement new editor based on diagram, so maybe next questions will follow, but I don't want to ask something I haven't studied and tested.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 27 Jul 2022
1 answer
54 views

Hi all, I'm trying to do something very similar to the WPF Custom Shape example; add controls to a shape in some sort of container (panel,...)

WPF Example desired in Winforms

Is there a Winforms version of this example somewhere?

Future Request:  I think (IMHO) that there should be a section for this.  Defining a Custom Shape, Adding Controls, Setting Custom Connection Points, Adding the new shape to the Toolbox, Configuring the Properties Editor, and setting up Drag-Drop.  If you are creating a custom shape all of these are parts of the effort.  The Documentation is all spread out over each element with no real guiding document to cover what all is possible/necessary to get a working shape (that i could find anyway).

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 27 Jan 2022
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
Buttons, RadioButton, CheckBox, etc
DropDownList
ComboBox and ListBox (obsolete as of Q2 2010)
ListView
Chart (obsolete as of Q1 2013)
Form
PageView
MultiColumn ComboBox
TextBox
Menu
RichTextEditor
PropertyGrid
RichTextBox (obsolete as of Q3 2014 SP1)
Panelbar (obsolete as of Q2 2010)
Tabstrip (obsolete as of Q2 2010)
PivotGrid and PivotFieldList
MaskedEditBox
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
Panorama
GanttView
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
AutoCompleteBox
Label
VirtualGrid
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
ProgressBar
Rotator
TrackBar
MessageBox
CheckedDropDownList
SpinEditor
StatusStrip
CheckedListBox
Wizard
ShapedForm
SyntaxEditor
TextBoxControl
LayoutControl
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
CAB Enabling Kit
TabbedForm
DataEntry
GroupBox
ScrollablePanel
WaitingBar
ImageEditor
ScrollBar
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
TaskBoard
Barcode
Styling
ColorBox
PictureBox
Callout
VirtualKeyboard
FilterView
Accessibility
DataLayout
NavigationView
ToastNotificationManager
CalculatorDropDown
Localization
TimePicker
ValidationProvider
FontDropDownList
Licensing
BreadCrumb
ButtonTextBox
LocalizationProvider
Dictionary
Overlay
Security
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
Rating
TimeSpanPicker
BarcodeView
Calculator
OfficeNavigationBar
Flyout
TaskbarButton
HeatMap
SlideView
PipsPager
+? more
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?