HubTile Service
The HubTileService provides the ability to group hub tiles with a group tag and to freeze or unfreeze groups of hub tiles.
Properties
- GroupTag (attached property): Identifies the GroupTag attached property.
- GetGroupTag: Gets the group tag of the provided hub tile.
- SetGroupTag: Sets the group tag of the specified hub tile to the specified value.
- FreezeGroup: Freezes a group of hub tiles.
- UnfreezeGroup: Unfreezes a group of hub tiles.
Example
Example 1 demonstrates how a the HubTileService.GroupTag can be utilized to freeze hub tiles.
Example 1: Using the HubTileService.GroupTag
<Grid xmlns:telerik="using:Telerik.UI.Xaml.Controls.Primitives">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<telerik:RadSlideHubTile UpdateInterval="0:0:1" VerticalAlignment="Top" telerik:HubTileService.GroupTag="firstGroup" >
<telerik:RadSlideHubTile.TopContent>
<TextBlock Text="firstTopContent"/>
</telerik:RadSlideHubTile.TopContent>
<telerik:RadSlideHubTile.BottomContent>
<TextBlock Text="firstBottomContent"/>
</telerik:RadSlideHubTile.BottomContent>
</telerik:RadSlideHubTile>
<telerik:RadSlideHubTile UpdateInterval="0:0:1" x:Name="secondHubTile" telerik:HubTileService.GroupTag="secondGroup">
<telerik:RadSlideHubTile.TopContent>
<TextBlock Text="secondTopContent"/>
</telerik:RadSlideHubTile.TopContent>
<telerik:RadSlideHubTile.BottomContent>
<TextBlock Text="secondBottomContent"/>
</telerik:RadSlideHubTile.BottomContent>
</telerik:RadSlideHubTile>
<telerik:RadSlideHubTile UpdateInterval="0:0:1" VerticalAlignment="Bottom" telerik:HubTileService.GroupTag="firstGroup">
<telerik:RadSlideHubTile.TopContent>
<TextBlock Text="thirdTopContent"/>
</telerik:RadSlideHubTile.TopContent>
<telerik:RadSlideHubTile.BottomContent>
<TextBlock Text="thirdBottomContent"/>
</telerik:RadSlideHubTile.BottomContent>
</telerik:RadSlideHubTile>
<StackPanel Grid.Column="1">
<Button Content="Freeze first group" Click="Button_Click" />
<Button Content="Freeze second group" Click="Button1_Click" />
</StackPanel>
</Grid>
Example 2: Using the HubTileService methods
public sealed partial class MainPage : Page
{
public MainPage()
{
this.InitializeComponent();
}
private void Button_Click(object sender, RoutedEventArgs e)
{
HubTileService.FreezeGroup("firstGroup");
}
private void Button1_Click(object sender, RoutedEventArgs e)
{
var groupTag = HubTileService.GetGroupTag(secondHubTile);
HubTileService.FreezeGroup(groupTag);
}
}