Help with Freezing and UnFreezing

3 posts, 1 answers
  1. GJ Kuz
    GJ Kuz avatar
    29 posts
    Member since:
    May 2011

    Posted 01 May 2012 Link to this post

    Dear Telerik Team,

    I use the following code to bind the HubTile. I couldn't figure out a way a Freeze and unfreeze the hubtiles. I tried traversing the visualtree to find the hubtile control. so far no luck. Could you please help me out here?
    <ListBox x:Name="lstCalcCategories" Grid.Row="0" SelectionChanged="lstCalcCategories_SelectionChanged" >
                            <ListBox.ItemTemplate>
                                <DataTemplate>
                                    <Grid Width="180" Height="180">
                                        <telerikPrimitives:RadSlideHubTile x:Name="rdHubCalcs" FontSize="30" UpdateInterval="{Binding UpdateInterval}">
                                            <telerikPrimitives:RadSlideHubTile.Title>
                                                <TextBlock Text="{Binding Title}"/>
                                            </telerikPrimitives:RadSlideHubTile.Title>
                                            <telerikPrimitives:RadSlideHubTile.Picture>
                                                <Image Source="{Binding Source}" Stretch="UniformToFill" />
                                            </telerikPrimitives:RadSlideHubTile.Picture>
                                        </telerikPrimitives:RadSlideHubTile>
                                    </Grid>
                                </DataTemplate>
                            </ListBox.ItemTemplate>
                            <ListBox.ItemsPanel>
                                <ItemsPanelTemplate>
                                    <telerikPrimitives:RadWrapPanel  />
                                </ItemsPanelTemplate>
                            </ListBox.ItemsPanel>
                        </ListBox>
  2. Answer
    Victor
    Admin
    Victor avatar
    1351 posts

    Posted 02 May 2012 Link to this post

    Hi Gilles,

    You need to use RadHubTileService's attached properties and methods. In essence you need to set a group tag on your hub tiles and then use the hub tile servies's FreezeGroup() and UnfreezeGroup() methods in order to freeze/unfreeze the desired tiles. For example:

    <telerikPrimitives:RadSlideHubTile telerikPrimitives:RadHubTileService.GroupTag="MyGroup"/>
    <telerikPrimitives:RadHubTile telerikPrimitives:RadHubTileService.GroupTag="MyGroup"/>

    RadHubTileService.UnfreezeGroup("MyGroup");
    RadHubTileService.FreezeGroup("MyGroup");

    I hope this information was helpful, please write again if you have other questions.

    Greetings,
    Victor
    the Telerik team

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

  3. DevCraft banner
  4. GJ Kuz
    GJ Kuz avatar
    29 posts
    Member since:
    May 2011

    Posted 02 May 2012 Link to this post

    Thanks Victor. Worked like a charm.
Back to Top