I got 3 questions for my UI for Winforms evaluation

4 posts, 0 answers
  1. Steve
    Steve avatar
    2 posts
    Member since:
    Aug 2012

    Posted 11 Aug 2017 Link to this post

    Hello Telerik team,

    my name is Steve, I’m new to your UI for WinForm controls, and to your forum.
    I’m currently the controls for my company, and got 3 (long) questions I like to ask you.

    So far me and my colleges like what I could find out about using the Controls. The UI
    Winform demo program made also a very positive impression to my supervisor.

    We are likely to get a license, but requested to find a solution to my questions first.

    Question 1:
    I like to know why there is a rad control replacement for the Winform Form class, but
    no replacement for the Winform Usercontrol Class. Can I use normal Usercontrol classes
    for making user controls, and still have full Telerik UI support? Or is something replacing
    the Winform usercontrols and I just havent found it yet?

    Question 2:
    In Winforms I have the problem that Trackbar Sliders can not be used as soon the Touch Gestures are enabled.
    I saw that I do not have this problem when I do the same only using Telerik UI controls.

    My question here is: Is the problem that exists in WinForms, known to Telerik, and Telerik
    found a solution to the Slider problem? Or is it just something weird that only happens on my PC?

    To understand best what my slider problem is I made this demo application:
    The test program has 2 forms, one enables gestures following Mircosoft’s example code
    for Windows Touch (source Windows 7 SDK example projects). The other form does not
    enable the gestures. Both forms have a trackbar slider in it.
    On the form where gestures are on, its impossible to move the slider button via touch.
    On the form that does not enable gestures, it is possible without any kind of problems.

    Question 3:
    I want to create a image list control that supports touch panning left and rigth.
    The control holds for example 30 images, only 5 of them are seen. To see the remaing 25
    images the user would pan left or right to move forward or backward in the image list.

    I create this kind of control by using the ListView control and its LargeImageList component.
    I made a example project that shows it:

    I tried to recreate the control by using Teleriks Rad ListView control. So far I managed it to
    load and display my images in the list. What I fail to do are 2 things:
    1. The controls lists the images in a vertical list (pan up and down to move in it).
    I haven’t found a way to make the list horizontal (so I can pan left and right).
    2. The list automatical creates several rows by itself. I have not figured out how to
    force the control to just display a single row of images.

    I uploaded what I made got so far as well under this link:

    To successfully replicate the image list as in my Picture Slider demo I have this questions:
    1. Is the Rad ListView control the right control to make a image slider list? Or do you
    suggest to use a different control to display a image gallery in a win form.
    2. To populate the list I have to load all images to memory at start. This approach anyhow
    can become very memory consuming, if I have to load many pictures. Does any Telerik UI
    Control support a better approach, where I have not to load all images at start?

    All 3 example projects are C# .NET 3.5 created in Visual Studio 2010. Zipped as a Archive
    and uploaded to my dropbox, so I can share a download link with you.

    I thank for any kind of answer in advance. And I’m sorry for the length of my questions.
    English is not my native language.

    Thank you for your time in advance and kind regards

  2. Hristo
    Hristo avatar
    1522 posts

    Posted 14 Aug 2017 Link to this post

    Hi Steve,

    Thank you for writing.

    Question 1:
    RadForm extends the standard System.Windows.Form class and adds to it themes, full MDI support and a complete integration with the rest of the controls. It is completely compatible with the standard UserControl class which does not have a Telerik alternative. In this respect, you will be able to use various user controls added to a RadForm.

    Question 2:
    Your second project does not include any Telerik references. You can go ahead and try the RadTrackBar control. Our framework has a built-in Touch support and you can enable it for a control as simple as this: 
    Additional information is available here: http://docs.telerik.com/devtools/winforms/telerik-presentation-framework/touch-support. Speaking more generally, achieving touch support in WinForms is a challenging task. We are also using native APIs to enable touch support and in the WndProc method of the base RadControl class we listening for the WM_GESTURE message.

    Question 3:
    You can set the Orientation property of the view element object. This way you will end up with horizontally scrollable list view: 
    public RadForm1()
        this.radList.ViewType = ListViewType.IconsView;
        ((IconListViewElement)this.radList.ListViewElement.ViewElement).Orientation = Orientation.Horizontal;

    I am also attaching a short video showing the result on my end. Please note that RadListView uses virtualization for the UI elements. In your actual scenario, this means that when you scroll horizontally the visual elements holding the images will be reused. As you have noted, however, the data items need to be loaded in the memory. Unless you will be dealing with very large images or too many of them this should not be a problem.

    As an alternative to RadListView, you can also check our RadVirtualGrid control. You can set it up with a single row and add as many columns as needed. It will only load data items for the currently visible cells. Detailed information is available here:  
    I hope this helps. Should you have further questions please do not hesitate to write back.

    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Steve
    Steve avatar
    2 posts
    Member since:
    Aug 2012

    Posted 18 Aug 2017 Link to this post

    Hello Hristo,

    my appolgies for the late responce. I got an emergency situation at a costumer that consumes all my time, this week.

    for Answer 1: Thank you for explaing me about the user controls.

    for Answer 2: I tryed your suggestion out with the rad controls. And by doing so the Trackbar slider works as if I never enabled any gestures. That great to see. I guess the key lays in where to enable Touch gestures. Your/Telerik's approach to enable it from a control instead of the form itself. Seems to be the way to go.

    for Answer 3: I tryed your code and Instantly got the correct result. Thank you alot for the aid there. But I can't help but wonder:
    Is there no Property for "((IconListViewElement)this.radList.ListViewElement.ViewElement).Orientation = Orientation.Horizontal;" ?
    I found the Property for "ViewType" but not for the ViewElement.Orientation...

    Thank you also for telling me about the RadVirtualGrid control as alternative. It sounds like to be the best bet, for handling dynamic image loading.

    I'm defintly trying that control out, (Althougth that has wait for another week, because of mentioned costumer emergency situation).


    In case I get any follow up questions, I may post them here. Until so I want to thank you once more for your support. I'm positively suppriced how good and helpful it actually is.

    Thank you for that.



  4. Hristo
    Hristo avatar
    1522 posts

    Posted 21 Aug 2017 Link to this post

    Hi Steve,

    Thank you for writing back.

    I am glad that you are seeing the desired results in your project using our controls. Regarding your comment about the third question, the ViewType property affects globally the layout of the RadListView control: http://docs.telerik.com/devtools/winforms/listview/views. Each of these views has a corresponding view element which is responsible for building the element hierarchy and for the measure and arrange of the layout. More information about the architecture of our framework is available here: http://docs.telerik.com/devtools/winforms/telerik-presentation-framework/overview/overview.

    The Orientation property is actually defined in the base BaseListViewElement class so you can set it without actually casting it to IconListViewElement
    this.radList.ListViewElement.ViewElement.Orientation = Orientation.Horizontal;

    I hope this helps. Please let me know if you have other questions.

    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top