RadSlider contained in RadToolBar

3 posts, 0 answers
  1. Kareema
    Kareema avatar
    17 posts
    Member since:
    Aug 2011

    Posted 16 Sep 2011 Link to this post

    Hi

    I'm fairly new to WPF. I'm trying to display a slider control between buttons on a tool bar.

    I want my XAML to look something like this:

    <telerik:RadToolBar>
                    <telerik:RadButton ToolTip="This is a button to the the left of the slider">
                        <Image Source="/Icons/left_icon.png" />
                    </telerik:RadButton>
                    <telerik:RadSlider Value="5" Minimum="0" SmallChange="1" Maximum="100" />
                    <telerik:RadButton ToolTip="This is a button to the right of the slider">
                        <Image Source="/Icons/right_icon.png"/>
                    </telerik:RadButton>
                </telerik:RadToolBar>

    This doesn't show me the slider at all. Does it need some special container or a special width set to it?
  2. Miro Miroslavov
    Admin
    Miro Miroslavov avatar
    588 posts

    Posted 21 Sep 2011 Link to this post

    Hello Kareema,

     Because the ToolBar is trying to use the minimum required size of the controls inside, you need to specify explicit Width to the Slider... for example 100 if it suits your needs.

    <telerik:RadSlider Value="5" Minimum="0" SmallChange="1" Width="100" Maximum="100" />

    Regards,
    Miro Miroslavov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. Kareema
    Kareema avatar
    17 posts
    Member since:
    Aug 2011

    Posted 21 Sep 2011 Link to this post

    Hi Miro

    Thanks for the reply! This worked perfectly.

    Kareema
Back to Top