Telerik Forums
UI for WinForms Forum
1 answer
145 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
2 answers
566 views

How to do this (I hope) simple action?

I tried to set BeginEditMode to different options, AllowEditRow is set to true, but when I press F2 (for example) nothing happens.

Data displayed ok.

What additionally have I do?

Why there is no guide in documentation? Or I didn't find it?

Thank you!

Vitalii
Top achievements
Rank 1
Iron
 answered on 29 Nov 2022
1 answer
92 views

Hello everyone.
Can anyone help me fix this?
Each Telerik Control has multiple entries in the Toolbox - that's just a small portion.
The duplicates all point to the same library.
The Version of each tool is identical to that of its duplicate.
A few times I've uninstalled and reinstalled. Does not fix it.
This problem cannot be fixed with Telerik Toolbox Configurator.
I would appreciate any help or advice you can provide

Thanks all.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 25 Nov 2022
15 answers
576 views
I have Q3 controls.  There is no tabstop property in my design properties window for raddropdownlist. And setting is programmatically to false does not work. What can I do?
Mark
Top achievements
Rank 2
Bronze
Bronze
Veteran
 answered on 22 Nov 2022
1 answer
96 views

Hello,

I am working on the development of an application and I have some doubts in the handling of the PivotFieldList control.

I would like to know how to enter the onclick event of the "Update" button of the PivotFieldList, I want to place some validations when clicking on that button.

 

I would also like to know how to access the onclick event of the "OK" button that appears in each filter of the fields that are displayed in the PivotGrid, because I also want to add some validations when the button is clicked.

Thanks for the support.

Dinko | Tech Support Engineer
Telerik team
 answered on 21 Nov 2022
4 answers
183 views
In RadGridview I need Rowspan style. 
I tried the HtmlView Definition method, this method affected with ColumnHeader also. 
I need to merge the rows as the attached image. If there is any other method than the HTML definition, please suggest.
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 18 Nov 2022
3 answers
1.6K+ views

[WinForm]

***Updated with Excel spreadsheet (Template.zip) and a simple Project (ReadExcelMap.zip) attachment.

Reference: https://docs.telerik.com/devtools/winforms/knowledge-base/import-data-from-excel

Question: How to get the Cell background color while importing from Excel spreadsheet?

E.g. The spreadsheet below with value and background color.

 

Import Spreadsheet:

XlsxFormatProvider formatProvider = new XlsxFormatProvider();
            Workbook workbook = formatProvider.Import(File.ReadAllBytes(@"C:\temp\Template.xlsx"));

            var worksheet = workbook.Sheets[0] as Worksheet;
            var table = new DataTable();


            CellSelection selection = worksheet.Cells[3, 25];
            ICellValue value = selection.GetValue().Value;
            CellValueFormat format = selection.GetFormat().Value;
            CellValueFormatResult formatResult = format.GetFormatResult(value);
            string result = formatResult.InfosText;

 

I could not find the relevant functions. Attempted the following but not working:
            IFill f = selection.GetFill().Value;
            ThemableColor c = selection.GetForeColor().Value;

 

Maria
Telerik team
 answered on 17 Nov 2022
1 answer
137 views

In the ItemCheckedChanged event, I want to also select the item, yet the following assignment returns the error "The property or indexer 'ListViewDataItem.Selected' cannot be used in this context because the set accessor is inaccessible."

e.Item.Selected = true;

How do I do this?

Dinko | Tech Support Engineer
Telerik team
 answered on 17 Nov 2022
1 answer
92 views

Hello!

The ShapedForm seems to suffer from a few problems:

1. The Shape doesn't honor the Bottom/Top Left/Right Rounded properties at all. No matter what those properties are set to, I always get rounded corners. The attached screenshot should have the top left and bottom left corner rounded only, but shows all corners rounded.

2. When using a border, it is cut off on the right top and right bottom corner (see screenshots). Depending on the border width, it is missing completely.

3. Even when the title bar is removed, the dialog can be moved by the mouse. While this is a handy feature, it also means that double-clicking on the top area of the shaped form will maximize the form and that's definitively not wanted.

 

Can we expect to have those bugs fixed in the near future since they severely limit the usability of this shaped form.
It simply doesn't look good that way and I'd rather resort to have a form background image with transparency key.

 

Martin

 

Dinko | Tech Support Engineer
Telerik team
 answered on 17 Nov 2022
1 answer
119 views

Hi folks!

Just recently I started using Telerik UI for WinForms, but while playing around with the controls to get used to them I found that the RadToggleSwitch doesn't behave like the toggle switches from WinUI/Win10/Win11.

First, the RadToggleSwitch can be activated and the slider can be dragged by using the right mouse button as well. That's not supposed to happen.

Second, the switch sometimes doesn't activate when clicking with the left mouse button. I couldn't find a consistent way to reproduce, though. Only the intermittent observation that the switch didn't change value even though I've clearly clicked inside the button area.

Perhaps a 1 pixel mouse movement between Press and Release will start a drag&drop operation for the slider instead of toggling the value?

Did anyone else experience this behavior?

 

Cheers

Martin

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