This is a migrated thread and some comments may be shown as answers.

Flip Tile Over or have ChildWindow overlay one tile?

5 Answers 72 Views
TileView
This is a migrated thread and some comments may be shown as answers.
Jonathon
Top achievements
Rank 1
Jonathon asked on 17 Sep 2011, 12:59 AM
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

5 Answers, 1 is accepted

Sort by
0
Zarko
Telerik team
answered on 20 Sep 2011, 09:42 AM
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 >>

0
Jonathon
Top achievements
Rank 1
answered on 20 Sep 2011, 06:02 PM
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
0
Zarko
Telerik team
answered on 21 Sep 2011, 12:25 PM
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 >>

0
Jonathon
Top achievements
Rank 1
answered on 21 Sep 2011, 07:24 PM
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
0
Accepted
Zarko
Telerik team
answered on 26 Sep 2011, 05:11 PM
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 >>

Tags
TileView
Asked by
Jonathon
Top achievements
Rank 1
Answers by
Zarko
Telerik team
Jonathon
Top achievements
Rank 1
Share this question
or