Hide MaximizeToggleButton via VisualState

4 posts, 0 answers
  1. Madhu
    Madhu avatar
    30 posts
    Member since:
    May 2011

    Posted 10 Nov 2011 Link to this post


    I would like to hide the maximizetogglebutton when the tile is in minimized state. For this purpose I am using Visual States. However this effect is not getting applied and I am still able to see this togglebutton (which I have customized to be a textblock) Can you please give me some pointers?

    <VisualState x:Name="Minimized">
    <ObjectAnimationUsingKeyFrames Duration="0"
    <DiscreteObjectKeyFrame KeyTime="0">

  2. Zarko
    Zarko avatar
    755 posts

    Posted 14 Nov 2011 Link to this post

    Hello Madhu,

     At the moment there's no "Minimized" VisualState because there's no difference between the Minimized and the Restored states, so if you want to hide the button in a VisualState you'll hide the Maximize/Minimized button in both Minimized and Restored state.
    Another way to hide the button is in code behind - you can handle the TileStateChanged event and hide the button in it.
    For further references could you please examine the attached project and if you have more questions feel free to ask.

    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. Mike Shilkov
    Mike Shilkov avatar
    33 posts
    Member since:
    Apr 2010

    Posted 23 Feb 2012 Link to this post

    Hello Zarko.

    I want to use your way of hiding Maximize button from codebehind.
    But I want to hide the button for some of tile items as soon as they are loaded, i.e. before TileStateChanged event is fired the first time.

    I'm populating TileView from XAML with data binding:
    <telerikNav:RadTileView ItemsSource="{Binding Entries}"...
    so I don't have access to RadTileViewItem instances and I guess I can't use any of their events. Is it possible to make a TileView event handler which fires right after all items are created?

    Thank you
  4. Zarko
    Zarko avatar
    755 posts

    Posted 27 Feb 2012 Link to this post

    I think that the best solution for you case is to use StyleSelector for your RadTileView. This way you can select the custom buttonless style for the items you want and an empty style for the rest.
    I've attached a sample project that shows how you can do this so could you please examine it and if need further assistance feel free to ask.

    Kind regards,
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top