Customize RadTileView

6 posts, 0 answers
  1. Jie Lin
    Jie Lin avatar
    8 posts
    Member since:
    Jun 2010

    Posted 04 Apr 2011 Link to this post

    Hello,

    We are using RadTileView in our WPF application. I need to customize the RadTileView in the following two ways.

    1. Reduce the header height. It currently seems having lots of margin/padding around the header text and we want to reduce them.

    2. Add a delete button ("X") on the left side of the header text (in the maximumized view only). When the button is clicked,
    we will remove that item from datasource.

    Can you please let me know how to implement above two things?

    Thanks!
  2. Zarko
    Admin
    Zarko avatar
    755 posts

    Posted 05 Apr 2011 Link to this post

    Hello Jie Lin,

     To achieve this you'll have to edit the default template of the RadTileViewItem. You can change the size of the header by setting size to the grid that contains the HeaderElement and also in this grid you should add the new button. I've attached a sample project so could you please examine it and see if it helps you?
    If you have further questions feel free to ask.

    Best wishes,
    Zarko
    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
  3. UI for WPF is Visual Studio 2017 Ready
  4. Jie Lin
    Jie Lin avatar
    8 posts
    Member since:
    Jun 2010

    Posted 07 Apr 2011 Link to this post

    Zarko,

    Thanks. This is what I am looking for. However I ran into two issue when running your sample project.

    1. Get the following exception:
    {"Type reference cannot find type named '{clr-namespace:Telerik.Windows.Controls.TileView;assembly=Telerik.Windows.Controls.Navigation}TileViewCommands'."}
    I commented out that "Command="Telerik_Windows_Controls_TileView:TileViewCommands.ToggleTileState" and it runs now. What could caused that? Different versions?

    2. The click on the header to maximize the item act weird especially after I double clicked the header. So I commented out the whole "ControlTemplate.Triggers" block in the xaml and it seems working properly now. So, I guess if no triggers defined for the template in my xaml, it just uses the default?

    3. The "X" button looks too overwhelming on every header. So I changed mind to use right-click context menu for delete operation. Since I don't need to add "X" button on the header anymore, is there any other simple way to shrink the header height instead of changing the default template?

    Thanks,

    Jie
     
  5. Zarko
    Admin
    Zarko avatar
    755 posts

    Posted 08 Apr 2011 Link to this post

    Hello Jie Lin,

     I'm very sorry but in my previous post I've attached the wrong dlls and that's why you were getting those errors. Unfortunately there's no easier way to shrink the header height but to edit the default template.
    Could you please examine the attached project(TileViewCustomTemplate.zip) and see if this time everything is OK? 

    Best wishes,
    Zarko
    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. Jie Lin
    Jie Lin avatar
    8 posts
    Member since:
    Jun 2010

    Posted 11 Apr 2011 Link to this post

    Yes,  this time the sample project works with no error. I am using Telerik RadControls for WPF 2010.3 version in the app. I guess we need to upgrade to 2011.1 version. Otherwise, we cannot use "TileViewCommands".

    Thanks.
  7. Zarko
    Admin
    Zarko avatar
    755 posts

    Posted 13 Apr 2011 Link to this post

    Hi Jie Lin,

     It's not necessary to upgrade, because you can edit the old template (the one from the 2010.3 version) where we don't use this command, but we advise you to upgrade because we are stopping the support for the old version (that's because the we made a major refactoring on the tileview for the 2011.1 version and most of the problems from 2010.3 are fixed in 2011.1).
    If you have more questions feel free to ask.

    All the best,
    Zarko
    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
Back to Top
UI for WPF is Visual Studio 2017 Ready