Flip Tile Over or have ChildWindow overlay one tile?

6 posts, 1 answers
  1. Jonathon
    Jonathon avatar
    50 posts
    Member since:
    Aug 2011

    Posted 16 Sep 2011 Link to this post

    Hi,

    I was wondering if there was a way to click a button in the RadTileView header and have an overlay display over the whole tile with a dialog box and everything outside the dialog box dark grayed out. Even cooler if there was a way to have some kind of animation that would flip the tile over so you could see some options on the back with a dialog box.

    Basically, what I want to know is if there is some way I can click a button in a tile's header and have a dialogbox (or replace all the content within the tile) come up and the user chooses a drop down option in the dialog box and can click either Ok or Cancel.

    If there was a way to do this, that would be great.

    Thanks,

    Jonathon
  2. Zarko
    Admin
    Zarko avatar
    755 posts

    Posted 20 Sep 2011 Link to this post

    Hello Jonathon,
    You can do both things - show a message box or switch the content of the RadTileViewItems. In both cases you'll have to edit the default RadTileViewItem template so that you'll have the new button in the header (you can also add the button in the ItemTemplate and this way you won't have to edit the template, but this way the button will be in the left part of the header). For the message box you can use the build in MessageBox or you can create your custom one and for the switching of the content you can use the RadTransitionControl or the RadFluidContentControl (which uses a RadTransitionControl inside). You can see demos of the TransitionControl here.
    I've attached a sample project which demonstrates both approaches so could you examine it and if you have more questions feel free to ask?

    Greetings,
    Zarko
    the Telerik team

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

  3. DevCraft banner
  4. Jonathon
    Jonathon avatar
    50 posts
    Member since:
    Aug 2011

    Posted 20 Sep 2011 Link to this post

    Hi Zarko,

    Thank you for the reply, however, I am using RadFluidContentControl to change the contents of the tile based on what state they are in. My DataTemplate for the ContentTemplate is:

     

    <DataTemplate x:Key="ContentTemplate" telerik:ContainerBinding.ContainerBindings="{StaticResource ContainerBindingCollection}">


    <
    telerik:RadFluidContentControl TransitionDuration="00:00:00.3" Transition="{StaticResource waveTransition}" ContentChangeMode="Manual" State="{Binding ContentState, Converter={StaticResource fluidContentStateConverter}}">

     

    <telerik:RadFluidContentControl.SmallContent>

     

    <local:TileContentSmall />

     

    </telerik:RadFluidContentControl.SmallContent>

     

     

    <telerik:RadFluidContentControl.Content>

     

    <local:TileContentRestored />

     

    </telerik:RadFluidContentControl.Content>

     

     

    <telerik:RadFluidContentControl.LargeContent>

     

    <local:TileContentLarge />

     

    </telerik:RadFluidContentControl.LargeContent>

     

    </telerik:RadFluidContentControl>

     

    </DataTemplate>


    In the example you posted, since the tiles didnt change their content, you were able to use the LargeContent state as the change, however, if I am already using all states, is there another way to do this?

    Thanks,

    Jonathon
  5. Zarko
    Admin
    Zarko avatar
    755 posts

    Posted 21 Sep 2011 Link to this post

    Hello Jonathon,
    Yes, instead of a RadFluidContentControl you can use the RadTransitionControl(the FluidControl uses it internally).
    Could you please examine the new attached project and see if this is what you need?

    Regards,
    Zarko
    the Telerik team

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

  6. Jonathon
    Jonathon avatar
    50 posts
    Member since:
    Aug 2011

    Posted 21 Sep 2011 Link to this post

    Hi Zarko,

    Thank you again for the reply. That's exactly what I need for the Xaml, however, I was wondering if there was a way to do this using MVVM? I tried what you did in my ViewModel, however, I need the sender object to know which RadButton I am using.

    Not sure how to get around this.

    Thanks,

    Jonathon
  7. Answer
    Zarko
    Admin
    Zarko avatar
    755 posts

    Posted 26 Sep 2011 Link to this post

    Hi Jonathon,
    A way to do this with MVVM is to use a command instead of an event handler and you can bind this command to a delegate command in your business object.
    For further infomation please examine the attached project and if you have more questions feel free to ask.

    Best wishes,
    Zarko
    the Telerik team

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

Back to Top
DevCraft banner