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

3 posts, 1 answers
  1. StepTNT
    StepTNT avatar
    18 posts
    Member since:
    Mar 2013

    Posted 19 May 2014 Link to this post

    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. Answer
    Deyan
    Admin
    Deyan avatar
    2041 posts

    Posted 22 May 2014 Link to this post

    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.

     
  3. DevCraft banner
  4. StepTNT
    StepTNT avatar
    18 posts
    Member since:
    Mar 2013

    Posted 23 May 2014 in reply to Deyan Link to this post

    Worked like a charm, thanks :)
Back to Top