Multiple Sliders on Track Bar

16 posts, 1 answers
  1. Bradley Lane
    Bradley Lane avatar
    22 posts
    Member since:
    Aug 2012

    Posted 18 Jun 2009 Link to this post

    Hi,

    I need something similar to your Silverlight/WPF RadSlider but for WinForms..

    Is it possible to have multiple sliders on your WinForms RadTrackBar or do I need to put a wrapper around your WPF Slider?

    Thanks,
    Brad
  2. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 18 Jun 2009 Link to this post

    Hi Bradley,

    Thank you for the question.

    The WIinForms TrackBar does not support multiple sliders. I have logged this feature for future implementation. You can nevertheless use the WPF slider, as you have suggested.

    Write back if you have other questions.

    Regards,
    Victor
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Nebras
    Nebras  avatar
    73 posts
    Member since:
    Jul 2010

    Posted 30 Mar 2011 Link to this post

    Is it supported now?
  5. Ivan Petrov
    Admin
    Ivan Petrov avatar
    701 posts

    Posted 04 Apr 2011 Link to this post

    Hello Nebras ,

    Thank you for writing.

    This particular functionality is not supported. However, if more people are interested in it, we will consider implementing it.

    Best wishes,
    Ivan Petrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. Bradley Lane
    Bradley Lane avatar
    22 posts
    Member since:
    Aug 2012

    Posted 04 Apr 2011 Link to this post

    Hi,

    It was logged as a feature for future implementation back in June 2009.
    I'm guessing it must have been logged as a very low priority!

    I have been using the WPF one; it works quite nicely in WinForms.

    Cheers,
    Brad
  7. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 05 Apr 2011 Link to this post

    Hi Bradley,

    This feature has a lower priority compared to the priority of other important features and fixes that we have scheduled in our To-Do list. You can increase the priority of the requested functionality by voting for it here. I am glad to hear that you find our RadSlider for WPF useful.

    Kind regards,
    Nikolay
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  8. George
    George avatar
    62 posts
    Member since:
    Sep 2008

    Posted 25 Nov 2012 Link to this post

    Hi, can anyone please explain to me how the WPF slider control can be added to a winform application?  I really cannot find any reference to it.

    Thanks,
  9. Answer
    Bradley Lane
    Bradley Lane avatar
    22 posts
    Member since:
    Aug 2012

    Posted 25 Nov 2012 Link to this post

    Hi George,

    Below is a small snippet from my code. But basically you need to put the control in an ElementHost Object. Look in your Visual Studio Toolbox under WPF Interoperability to add ElementHost via the designer. Below example adds ElementHost at runtime to a Panel and starts setting up a few events...

    private ElementHost CtrlHost;
    private RadSlider WpfSliderControl;
     
    // Winforms UserConstrol Constructor
    public WpfSlider( )
    {
        InitializeComponent( );
        WpfSliderControl = new RadSlider( );
    }
     
    private void WpfSlider_Load( object sender, EventArgs e )
    {
        // Create Host and Add to WinForms Panel
        CtrlHost = new ElementHost( );
        CtrlHost.Dock = DockStyle.Fill;
        panelSlider.Controls.Add( CtrlHost );
     
        // Create Slider and add to Host
        CtrlHost.Child = WpfSliderControl;
     
        // Add Slider Event(s)
        WpfSliderControl.Loaded += WpfSliderControlLoaded;
        WpfSliderControl.ValueChanged += WpfSliderControl_ValueChanged;
        WpfSliderControl.DragCompleted += WpfSliderControl_DragCompleted;
        WpfSliderControl.AddHandler( RepeatButton.ClickEvent, new RoutedEventHandler( slider_Click ), true );
    }
  10. George
    George avatar
    62 posts
    Member since:
    Sep 2008

    Posted 26 Nov 2012 Link to this post

    Thanks Bradley, really appreciate your prompt input. I tried this but I get an error that the radcontrol cannot be coverted to a win forms control in the following line:

    // Create Slider and add to Host

        CtrlHost.Child = WpfSliderControl;


    I probably have my reference assemblies wrong. If you are so kind what additional references did you add to your project to work, .net or telerik ones?

    Thank you very much.

    Regards,

    George
  11. Bradley Lane
    Bradley Lane avatar
    22 posts
    Member since:
    Aug 2012

    Posted 26 Nov 2012 Link to this post

    Hi George,

    I would recommend dropping an ElementHost control onto a blank form... it will automatically add the following .NET References for you: PresentationCore, PresentationFramework, UIAutomationProvider, WindowsBase and WindowsFormsIntegration.

    You will also need the Telerik.Windows.Controls Reference for the WpfSliderControl.

    in my code behind I'm using the following using:

    using System;
    using System.Collections.Generic;
    using System.Windows;
    using System.Windows.Controls.Primitives;
    using System.Windows.Forms;
    using System.Windows.Forms.Integration;
    using System.Windows.Media;
    using Telerik.Windows.Controls;
    using TickPlacement=Telerik.Windows.Controls.TickPlacement;

    Hope this helps.

    Cheers,
    Brad

  12. George
    George avatar
    62 posts
    Member since:
    Sep 2008

    Posted 26 Nov 2012 Link to this post

    Thank you very much, it works fine now. Really appreciate your feedback.

    Regards,

    George
  13. Ivan Petrov
    Admin
    Ivan Petrov avatar
    701 posts

    Posted 29 Nov 2012 Link to this post

    Hi guys,

    Thank you both for writing.

    I am glad you have found a solution to the problem at hand. 

    I have updated Bradley's Telerik points for sharing his knowledge and helping the Telerik community.

    I you have further questions, do not hesitate to write back.
     
    Kind regards,
    Ivan Petrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  14. George
    George avatar
    62 posts
    Member since:
    Sep 2008

    Posted 29 Nov 2012 Link to this post

    Dear Ivan,

    You guys have to consider to implement something more sexy in your library with regard to the functionality of slider controls. I am in a need for a multithumb slider, more than two thumbs, and the only solution I have found was in another vendors library. Given the steep price charged I had to choose either to continue my subscription with Telerik, or pay the other vendor for a subscription even if I only needed a single control.

    Furthermore, it would be nice if the functionality of WPF and WEB controls was also available in windows forms, there are still a bunch of us, oldtimers, still developing applications for this form..
  15. Ivan Petrov
    Admin
    Ivan Petrov avatar
    701 posts

    Posted 04 Dec 2012 Link to this post

    Hi George,

    Thank you for your suggestion.

    We are planning an update to our RadTrackBar control and we would really appreciate it if you would share your ideas and feedback regarding what you would expect from a track bar control. Also can you please share the scenario where you would use a track bar with multiple thumbs.

    Looking forward to your reply.
     
    Regards,
    Ivan Petrov
    the Telerik team
    Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.
  16. George
    George avatar
    62 posts
    Member since:
    Sep 2008

    Posted 04 Dec 2012 Link to this post

    Dear Ivan,

    A multiple thumbs trackbar could be useful in situations like the one I am facing in the project I am currently working on. There is a need for the end user to specify two adjacent time periods in monthly intervals e.g. one period starting from May-2013 and ending Aug-2015 and a second adjacent period starting from Sep-2015 and ending Jan-2020. Another example could be for the needs of project implementation timetable were multiple executional steps are adjacent to each other and need to be adjusted in a flexible manner.

    A multiple thumbs trackbar, with three sliders, is the most user friendly way to present this choice to the end user, having in mind that there is a need to display certain changes in the environment as selected values are changed. This scenario is rather cumbersome to implement using traditional data input controls.
  17. Ivan Petrov
    Admin
    Ivan Petrov avatar
    701 posts

    Posted 06 Dec 2012 Link to this post

    Hi George,

    Thank you for your reply.

    We really appreciate your feedback and we will take it into consideration when we implement our improvements.

    I have updated your Telerik points for the detailed use case in your post.

    If you have other questions, do not hesitate to write back.
     
    All the best,
    Ivan Petrov
    the Telerik team
    Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.
Back to Top
UI for WinForms is Visual Studio 2017 Ready