Hi,
I have a RadTileList which fills the entire width of the screen. By default it has a right padding (50px I guess which is perfect) and I would like to add the same on the left exactly the same way it's done in the demo app.
But I can't find where it's defined, I'm stuck in my research in RadTileListTemplate # ItemsPresenter
Thanks,
Rémi.
5 Answers, 1 is accepted
Why not setting padding directly to the tile list like:
<
telerik:RadTileList
ItemsSource
=
"{Binding Clubs}"
Padding
=
"50 0 0 0"
/>
Will that fit into your requirements or am I missing anything ?
Regards,
Maya
Telerik
Hi Maya,
My post was not enough complete.
The problem when I'm applying a left padding, as you have suggested, is that I always keep that padding when I'm scrolling.
The horizontal scrolling bar fill well the full width but I don't understand why the left padding remain on the RadTileList when scrolling.
Please see the attached image which illustrate the issue.
Thanks,
Rémi.
One thing that you can try is to set Margin of the TileGroupContainer. In this case it will be applied to each group, but there is no way for the time being to modify only the first group.
The approach I meant is:
<
ControlTemplate
x:Key
=
"TileGroupContainerTemplate"
TargetType
=
"telerik:TileGroupContainer"
>
<
Grid
Margin
=
"50 0 0 0"
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"{Binding GroupHeaderHeight, RelativeSource={RelativeSource AncestorType=telerik:RadTileList}}"
/>
<
RowDefinition
/>
</
Grid.RowDefinitions
>
<
ContentPresenter
Content
=
"{Binding Header}"
Margin
=
"{TemplateBinding Padding}"
VerticalAlignment
=
"{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment
=
"{TemplateBinding HorizontalContentAlignment}"
Visibility
=
"{Binding GroupHeaderVisibility, RelativeSource={RelativeSource AncestorType=telerik:RadTileList}}"
ContentTemplate
=
"{TemplateBinding HeaderTemplate}"
/>
<
ItemsPresenter
Grid.Row
=
"1"
/>
</
Grid
>
</
ControlTemplate
>
You can find that element in the template of RadTileList.
Let me know whether this corresponds to your requirements.
Regards,
Maya
Telerik
Unfortunately there still is a problem :
The end of the tile is cut the same amount of the margin value (see attached image).
Can't we make the same as the Demo's App RadTileList in the "All Controls" view ?
Rémi.
Indeed, you are right. I tried a couple of other things but it seems that for the time being RadTileList cannot behave smoothly with the requirements that you have.
Considering the demos app, it does not use RadTileList. It is just a simple ordering of items and does not support grouping, reordering, etc. .
Regards,
Maya
Telerik