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

Customize RadTileView

5 Answers 384 Views
TileView
This is a migrated thread and some comments may be shown as answers.
Jie Lin
Top achievements
Rank 1
Jie Lin asked on 04 Apr 2011, 11:04 PM
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!

5 Answers, 1 is accepted

Sort by
0
Zarko
Telerik team
answered on 05 Apr 2011, 12:20 PM
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
0
Jie Lin
Top achievements
Rank 1
answered on 07 Apr 2011, 05:49 PM
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
 
0
Zarko
Telerik team
answered on 08 Apr 2011, 02:40 PM
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
0
Jie Lin
Top achievements
Rank 1
answered on 11 Apr 2011, 10:22 PM
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.
0
Zarko
Telerik team
answered on 13 Apr 2011, 12:51 PM
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
Tags
TileView
Asked by
Jie Lin
Top achievements
Rank 1
Answers by
Zarko
Telerik team
Jie Lin
Top achievements
Rank 1
Share this question
or