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.
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
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).
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;
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.
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?
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
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.
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).