This is a migrated thread and some comments may be shown as answers.

I can't find where to style the "smallcontent" scrollbar

3 Answers 57 Views
TileView
This is a migrated thread and some comments may be shown as answers.
Joel
Top achievements
Rank 1
Joel asked on 16 May 2013, 06:33 PM
Hi,

I'm trying to style the scroll bar that allows the user to scroll through the "smallcontent" tiles.  There's a scrollview within the LargeContent tile view and that one picks up the general Scrollbar style properly.  How can I access the scrollbar (marked as "Not picking up style" in the attached image) style?

I added a screen shot showing the styled scrollbar and the one I can't style.

Thanks,

Joel

3 Answers, 1 is accepted

Sort by
0
Pavel R. Pavlov
Telerik team
answered on 21 May 2013, 12:22 PM
Hi Joel,

In order to achieve your requirement you can extract and edit the default template of the RadTileView control. By doing so you will be able to apply your custom style to the ScrollViewer named "ScrollViewer". You can find more information about how you can extract the template in this article.

For your convenience I extracted it in the attached project. Please take a look at it and let me know if it works for you.

All the best,
Pavel R. Pavlov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Joel
Top achievements
Rank 1
answered on 23 May 2013, 05:15 PM
Hi Pavel,

Thanks for your reply and example.  Everything worked fine in your example but I still wasn't getting the same behaviour in my application.  After some troubleshooting I found that by disabling the ApplicationTheme used in the control's constructor everything worked as expected.  So for some reason, if an application theme is set, not all controls behave the same (Horizontal ScrollBar compared to Vertical ScrollBar).  For the record and anyone else having the same issue, here is what I did:

public MyControl()
{
    Telerik.Windows.Controls.StyleManager.ApplicationTheme = null; // Null the theme before load
  
    InitializeComponent();
  
    Telerik.Windows.Controls.StyleManager.ApplicationTheme = new Windows8TouchTheme(); // Put the theme back to what it was
}

Easy as that.  If only I would of known that a day ago.

:-)

Thanks,

-- Joel
0
Pavel R. Pavlov
Telerik team
answered on 28 May 2013, 06:14 AM
Hi Joel,

Our style manager is not designed to change the ApplicationTheme at run-time. Hence setting it to null before the InitializeComponent() method, all Telerik's controls will take the default theme (which is Office_Black). Basically we do not guarantee that the ApplicationTheme will be changed as expected if you set it after the InitializeComponent() method using the StyleManager. It is most likely that the theme will not be properly changed or changed partially.

However, if you need to switch themes at run-time you can use our Implicit Styles in combination with our NoXAML dlls. You can find more information here.

Regards,
Pavel R. Pavlov
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
TileView
Asked by
Joel
Top achievements
Rank 1
Answers by
Pavel R. Pavlov
Telerik team
Joel
Top achievements
Rank 1
Share this question
or