TileViewItem events

3 posts, 1 answers
  1. Jorn
    Jorn avatar
    222 posts
    Member since:
    Jun 2009

    Posted 21 Jun 2011 Link to this post

    I have a databound tileview with a custom itemcontainerstyle (contenttemplate):
    <telerik:RadTileView Grid.Row="1" x:Name="TileView1" ItemContainerStyle="{StaticResource RadTileViewItemStyle1}"
                                      IsSelectionEnabled="True" SelectionMode="Single" MaximizeMode="Zero"
                                      Loaded="TileView1_Loaded" PreviewTileSelectionChanged="TileView1_PreviewTileSelectionChanged">
        <telerik:RadTileView.ItemTemplate>
            <DataTemplate>
                <TextBlock Text="{Binding name}"/>
            </DataTemplate>
        </telerik:RadTileView.ItemTemplate>
        <telerik:RadTileView.ContentTemplate>
            <DataTemplate>
                <TextBlock Text="{Binding description}"/>
            </DataTemplate>
         </telerik:RadTileView.ContentTemplate>
    </telerik:RadTileView>

    How can I subscribe to events from the individual TileViewItems in this scenario; for example MouseEnter/MouseLeave?
  2. Answer
    Zarko
    Admin
    Zarko avatar
    755 posts

    Posted 21 Jun 2011 Link to this post

    Hello Jorn,
    In your case you'll have to wait until the RadTileView generate the containers of the items and manually subscribe for their events in code behind.
    For further references could you please examine the attached project and if you have more questions feel free to ask.

    Regards,
    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. DevCraft banner
  4. Jorn
    Jorn avatar
    222 posts
    Member since:
    Jun 2009

    Posted 21 Jun 2011 Link to this post

    I suspected that I had to go this route, but thanks for the attached project; it will save me some time!
Back to Top