RadTileViewItem Style

4 posts, 0 answers
  1. Rav
    Rav avatar
    36 posts
    Member since:
    Nov 2011

    Posted 14 Nov 2009 Link to this post

    Hi

    Are we able to programmatically apply a style to a dynamically created RadTileViewItem? Specifically I would like to change the background colours of the headers. What is the template/parameters for the style?

    Regards

    Rav
  2. Tihomir Petkov
    Admin
    Tihomir Petkov avatar
    576 posts

    Posted 17 Nov 2009 Link to this post

    Hello Rav,

    There is currently no property of the RadTileViewItem control that fascilitates easily chaging the header background. We will add such a property as soon as our schedule allows us to, hopefully for the upcoming service pack.

    So, at the moment the only way to cutomize the header background is to edit the control template. The easiest way to customize the header at runtime would be to have a style (in XAML) specifying the modified control template in the resources of your page/application, get a reference to that resource, and set the style to the TileViewItem at the moment you need to.

    You may find the following resources useful:
    http://betaforums.silverlight.net/forums/p/115084/264065.aspx
    http://forums.silverlight.net/forums/t/22159.aspx
    http://blogs.microsoft.co.il/blogs/alex_golesh/archive/2008/09/09/quick-silverlight-tip-define-control-style-dynamically.aspx

    I hope I was able to help. Please let me know if you have any other questions.

    All the best,
    Tihomir Petkov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Rav
    Rav avatar
    36 posts
    Member since:
    Nov 2011

    Posted 17 Nov 2009 Link to this post

    Hi Tihomir

    Thanks for the reply, and yes that is the solution I'm looking for, but I would like to know the default control template XAML that is used by the RadTileViewItem so that I can appropriately modify it.

    Regards

    Rav
  5. Tihomir Petkov
    Admin
    Tihomir Petkov avatar
    576 posts

    Posted 17 Nov 2009 Link to this post

    Hello Rav,

    You can edit the default template of the control via the standard way in MS Expression Blend (right click->Edit template->Edit a copy). I created a sample project which has the the template of the TileViewItem already extracted. Let me know if you have any dificulties with that.

    All the best,
    Tihomir Petkov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top