add a delete button only in small & normal view

2 posts, 0 answers
  1. Sam
    Sam avatar
    10 posts
    Member since:
    Dec 2013

    Posted 11 Jan Link to this post



    I use telerik tile view in our project.

    We have customized the template to add a "remove button" in the header by editing the tileview template. The delete button is available in the different views (small, normal & large). We have been requested to set the button only in small & normal view. So, how can we remove the "delete button" from the large view only.


    Thanks for your replies.

    Best regards


  2. Evgenia
    Evgenia avatar
    1396 posts

    Posted 11 Jan Link to this post

    Hi Sam,

    I'm assuming that you are familiar with our documentation article where we described together with code samples how you might customize the TileViewItemHeader to add close button. Since this code will result in close button for every TileState -- Maximized, Restored or Normal you might easily control at which tile state it will appear in xaml. All you need to do is to make the CloseButton Visibility Collapsed when TileState is maximized. For example:

                                    <VisualStateGroup x:Name="TileStates">
                                        <VisualState x:Name="Maximized">
                                                <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="IsChecked" Storyboard.TargetName="MaximizeToggleButton">
                                                    <DiscreteObjectKeyFrame KeyTime="0">
                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="CloseButton">
                                                    <DiscreteObjectKeyFrame KeyTime="0">

    Let me know how this works for you.
    P.S. The full source code for the sample in this help article is available in a SDK sample - here.

    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 Feedback Portal and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
Back to Top