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

TiltEffect enabled on the whole grid and not on the single elements

2 Answers 51 Views
DataBoundListBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
StepTNT
Top achievements
Rank 1
StepTNT asked on 19 May 2014, 04:20 PM
Hi there!
I'm building a DataBoundListBox in which I have some Grids filled with contents.
I've enabled the TiltEffect by registering the Grid to the enabled controls but what I get is a tilt effect on each of the grid's objects rather than on the whole Grid.
InteractionEffectManager.AllowedTypes.Add(typeof(Grid));

01.<telerikPrimitives:RadDataBoundListBox.ItemTemplate>
02.    <DataTemplate>                           
03.        <Grid telerik:InteractionEffectManager.IsInteractionEnabled="True"
04.                                  Margin="10, 10, 10, 30">
05.            <Grid.RowDefinitions>
06.                 <RowDefinition Height="Auto"/>
07.                 <RowDefinition Height="20"/>
08.                 <RowDefinition Height="*"/>
09.                 <RowDefinition Height="20"/>
10.                 <RowDefinition Height="Auto"/>
11.             </Grid.RowDefinitions>
12.             <Grid.ColumnDefinitions>
13.                  <ColumnDefinition Width="0.05*"/>
14.                  <ColumnDefinition Width="0.05*"/>
15.                  <ColumnDefinition Width="*"/>
16.              </Grid.ColumnDefinitions>
17.              <Rectangle Fill="Gray"
18.                                           Margin="5,0,5,0"
19.                                           Grid.Column="0"
20.                                           Grid.Row="0"
21.                                           Grid.RowSpan="5"/>
22.               <TextBlock Text="{Binding Title}"
23.                                           Foreground="Black"
24.                                           FontSize="36"
25.                                           FontWeight="Light"
26.                                           TextAlignment="Left"
27.                                           VerticalAlignment="Top"
28.                                           Grid.Column="2"
29.                                           Grid.Row="0" />
30.                <TextBlock Text="{Binding CreationDate, StringFormat='{}{0:dd/MM/yyyy}'}"
31.                                           Foreground="Black"
32.                                           FontSize="18"
33.                                           FontWeight="Light"
34.                                           TextAlignment="Right"
35.                                           VerticalAlignment="Bottom"
36.                                           Grid.Column="2"
37.                                           Grid.Row="0" />
38.               <TextBlock Text="{Binding Description}"
39.                                           TextWrapping="Wrap"
40.                                           TextTrimming="WordEllipsis"
41.                                           Foreground="#FF5F6458"
42.                                           FontSize="18"
43.                                           FontWeight="Light"
44.                                           TextAlignment="Left"
45.                                           VerticalAlignment="Center"
46.                                           Grid.Column="2"
47.                                           Grid.Row="2" />
48.                 <TextBlock Text="{Binding Author, Converter={StaticResource AuthorToAuthorStringConverter}}"
49.                                           Foreground="Black"
50.                                           FontSize="18"
51.                                           FontWeight="Light"/>                             
52.             </Grid>
53.    </DataTemplate>
54.</telerikPrimitives:RadDataBoundListBox.ItemTemplate>

Do you have any clues?

2 Answers, 1 is accepted

Sort by
0
Accepted
Deyan
Telerik team
answered on 22 May 2014, 08:14 AM
Hi Stefano,

Just set the IsInteractionEnabled to true on DataBoundListBox and add the RadDataBoundListBoxItem to the allowed types. This should do the job.

Regards,
Deyan
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
StepTNT
Top achievements
Rank 1
answered on 23 May 2014, 09:39 AM
Worked like a charm, thanks :)
Tags
DataBoundListBox
Asked by
StepTNT
Top achievements
Rank 1
Answers by
Deyan
Telerik team
StepTNT
Top achievements
Rank 1
Share this question
or