Transitioning Between UserControls

4 posts, 0 answers
  1. Marcel
    Marcel avatar
    37 posts
    Member since:
    Aug 2011

    Posted 23 Nov 2011 Link to this post

    Hi, 
    
    So i have been experimenting with the RadTransitionControl  using a ListBox and some simple data classes. This work fine. 

    But I have some usercontrol's which I have previously created and would like to transition between them. How would this work?

    Would I create an ObservableCollection of UserControls? What would you add in the DataTemplate? This is what I had for my simple data class example. Then I changed the collection to a Collection of UserControls:

    //List of UserControls
    <ListBox x:Name="ListOfUserControls"
             ItemsSource="{Binding Path=Collection}" Visibility="Collapsed"/>

     <telerik:RadTransitionControl Grid.Column="1" Content="{Binding SelectedItem,
     ElementName=ListOfUserControls}" Margin="104,0,113,0">
                <telerik:RadTransitionControl.ContentTemplate>
                    <DataTemplate>
                       //WHAT WOULD GO HERE
                    </DataTemplate>
                </telerik:RadTransitionControl.ContentTemplate>

    Any help of this would be great. 

    Thanks
  2. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 25 Nov 2011 Link to this post

    Hello,

    Keeping a collection of UserControls usually is not a good idea because it might lead to memory leaks (the controls will not be freed until the collection is freed). Our examples demonstrate how to use the Silverlight navigation framework with the same final effect:
    http://demos.telerik.com/silverlight/#TransitionControl/FirstLook

    This is a little bit more complex, bug is generally a better approach.

    Kind regards,
    Valeri Hristov
    the Telerik team

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

  3. DevCraft banner
  4. Hermano
    Hermano avatar
    1 posts
    Member since:
    Jan 2012

    Posted 27 Jan 2012 Link to this post

    Hello,

    It (TransitionControl/FirstLook) does not work within a RadWindow.

  5. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 01 Feb 2012 Link to this post

    Hello Hermano,

    What problem do you observe when you try putting TransitionControl into RadWindow control? If you could share with us some code this could be of great help.

    Regards,
    Miroslav Nedyalkov
    the Telerik team

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

Back to Top