Scrolling in the dropdown with a grouped source.

6 posts, 0 answers
  1. keepITcool
    keepITcool avatar
    8 posts
    Member since:
    Sep 2018

    Posted 06 Oct 2018 Link to this post

    I have a RadComboBox with a ListCollectionView with grouping.
    My problem is that the scrollviewer scrolls between the groups, not the items...
    Pressing the down/up keys correctly moves thru the items, but scrolling (either clicking or with wheel)  moves thru the groups.
    Some groups may have more items than will fit in the dropdown and it's very hard to see and select them.

    I need to change this. How?

     

    Jurgen

  2. keepITcool
    keepITcool avatar
    8 posts
    Member since:
    Sep 2018

    Posted 06 Oct 2018 in reply to keepITcool Link to this post

    I bit of fiddling and voila!

    ScrollViewer.CanContentScroll = "False"

    This is bound to the "Part_ScrollViewer" which surrounds the ItemsPresenter in the ControlTemplate. 
    BUT: then a default ScrollViewer of the ItemsControl (or ItemsPresenter?) kicks in...

    Just what the doctor ordered!

    Jurgen

  3. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    908 posts

    Posted 10 Oct 2018 Link to this post

    Hello Jurgen,

    I'm glad to hear that you found a solution to your issue. If I can further assist you in any way, please let me know.

    Regards,
    Dilyan Traykov
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  4. keepITcool
    keepITcool avatar
    8 posts
    Member since:
    Sep 2018

    Posted 10 Oct 2018 Link to this post

    plenty.  had to dive into the documentation, but finally got rid of Fluent's ripple. (hate it)

    there is however an enigma on styling the RadToggleButton... I'm trying to set a style in order to override the Accent background/ white foreground in Fluent...  Created a dummy application and all is fine. Trying to do it  in the real project and it fails. time and time again. Driving me mad. Will upload but must go to airport now.

    Later! Jurgen

  5. keepITcool
    keepITcool avatar
    8 posts
    Member since:
    Sep 2018

    Posted 10 Oct 2018 in reply to keepITcool Link to this post

    yep. solved too, but not the way I wanted or understand.

    the RadToggleButtons were inside a RadToolBar.  Either putting the style in global or the toolbar resources didn't work. But when I changed the containing RadToolBar to a StackPanel .. all works as expected.
    Bloody hell that was complicated and time consuming (4 hours of fiddling?).

    Must dash! Jurgen

  6. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    908 posts

    Posted 11 Oct 2018 Link to this post

    Hello Jurgen,

    Please let me clarify why the style for the RadToggleButtons is not applied in your scenario. The RadToolBar control uses StyleSelector mechanism to re-style its items and has predefined styles for the most commonly used controls as its content. This has been documented in the following article.

    So, to correctly apply the style to the RadToggleButtons of the control, you should define it like this:

    <Grid>
        <Grid.Resources>
            <Style x:Key="CustomButtonStyle" TargetType="telerik:RadToggleButton" BasedOn="{StaticResource ToolBarRadToggleButtonStyle}">
                <Setter Property="Foreground" Value="Red" />
            </Style>
            <telerik:ToolBarContainerStyleSelector x:Key="selector">
                <telerik:ToolBarContainerStyle TypeName="RadToggleButton" ContainerStyle="{StaticResource CustomButtonStyle}" />
            </telerik:ToolBarContainerStyleSelector>
        </Grid.Resources>
        <telerik:RadToolBar ItemContainerStyleSelector="{StaticResource selector}">
            <telerik:RadToggleButton Content="FILE" />
            <telerik:RadToggleButton Content="EDIT " />
            <telerik:RadToggleButton Content="VIEW" />
            <telerik:RadToggleButton Content="BUILD" />
            <telerik:RadToggleButton Content="DEBUG" />
            <telerik:RadToggleButton Content="HELP" />
        </telerik:RadToolBar>
    </Grid>

    I hope you find this clarification helpful.

    Regards,
    Dilyan Traykov
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top