MosaicHubTile's text is not updated when navigating back to the page

2 posts, 0 answers
  1. StepTNT
    StepTNT avatar
    18 posts
    Member since:
    Mar 2013

    Posted 02 Aug 2014 Link to this post

    Hi there!
    I'm using the RadMosaicHubTile to show some data loaded from my ViewModel.

    The data that I'm loading can be edited using some other pages, and I expect my tiles to be update accordingly.
    The problem is that this does not happen until I manually restart the app.

    Here's some code:
    01.<telerikPrimitives:RadDataBoundListBox ItemsSource="{Binding Projects, Source={StaticResource ProjectsViewModel}, Converter={StaticResource DummyConverter}, Mode=OneWay}" SelectionChanged="RadDataBoundListBox_OnSelectionChanged">
    02.    <telerikPrimitives:RadDataBoundListBox.ItemTemplate>
    03.        <DataTemplate>
    04.             <telerikPrimitives:RadMosaicHubTile Title="{Binding Title, Mode=OneWay, Converter={StaticResource DummyConverter}}" Width="215" Height="215" UpdateInterval="{Binding Converter={StaticResource RandomIntervalGenerator}}" ImageSources="{Binding Pictures, Converter={StaticResource PicturesListToImageListConverter}}">
    05.                  <telerikPrimitives:RadMosaicHubTile.BackContent>
    06.                       <Grid Background="{StaticResource PhoneAccentBrush}">
    07.                           <TextBlock HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,2,5,0" Text="{Binding Description}" />
    08.                        </Grid>
    09.                     </telerikPrimitives:RadMosaicHubTile.BackContent>
    10.                </telerikPrimitives:RadMosaicHubTile>
    11.            </DataTemplate>
    12.            </telerikPrimitives:RadDataBoundListBox.ItemTemplate>
    13.     <telerikPrimitives:RadDataBoundListBox.VirtualizationStrategyDefinition>
    14.        <telerikPrimitives:WrapVirtualizationStrategyDefinition Orientation="Horizontal" WrapLineAlignment="Near"/>
    15.    </telerikPrimitives:RadDataBoundListBox.VirtualizationStrategyDefinition>
    16.</telerikPrimitives:RadDataBoundListBox>

    As you can see, I'm using a special class called DummyConverter.
    This class just prints out the exact same value that is received from XAML, and I'm using it to test if my values are correct.

    What happens is that the values of the RadDataBoundListBox are printed fine, including the updates (for now I'm just editing the Title) property, but the tiles are not printing anything, they only print the first time that the app is started.
    This makes me thing that, despite changing the contents of the list, the bindings for the tiles are not updated, like if there's some sort of cache.

    Do you have any clue on this?
  2. Ivaylo Gergov
    Admin
    Ivaylo Gergov avatar
    661 posts

    Posted 06 Aug 2014 Link to this post

    Hi Stefano,

    I tried to reproduce this issue but with no avail. Here I have attached a sample project where I navigate to another page, then I change the data in the ViewModel and navigate back to the first page and I can see that the title of the RadMosaicHubTile changes. Please, take a look and see if this is the scenario and if not could you please modify it in order to reproduce the problem?

    I am looking forward to your reply. 

    Regards,
    Ivaylo Gergov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. DevCraft banner
Back to Top