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

Count not showing

1 Answer 44 Views
LiveTileHelper
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
GuruuMeditation
Top achievements
Rank 1
GuruuMeditation asked on 21 Aug 2013, 05:18 PM
Hi,

I have a problem when creating a tile (Based on RadHubTile). If I don't put it in the visual tree, the Count property is not showing.

Example with this control :

<UserControl x:Class="App.Controls.TileMedium"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Primitives"
             mc:Ignorable="d"
             FontFamily="{StaticResource PhoneFontFamilyNormal}"
             FontSize="{StaticResource PhoneFontSizeNormal}"
             Foreground="{StaticResource PhoneForegroundBrush}"
             d:DesignHeight="336"
             d:DesignWidth="336">
 
    <Grid x:Name="LayoutRoot"
          Background="{StaticResource BaseLightBrush}">
        <telerikPrimitives:RadHubTile x:Name="HubTile"
                                      Width="336"
                                      Height="336" Count="7"
                                     />
    </Grid>
</UserControl>


Code :

public TileMedium()
       {
           InitializeComponent();
 
           var umbrellaImage3 = new BitmapImage();
           var umbrellaResource3 = Application.GetResourceStream(new Uri("Assets/Tiles/Image.png", UriKind.RelativeOrAbsolute));
           umbrellaImage3.SetSource(umbrellaResource3.Stream);
 
           HubTile.ImageSource = umbrellaImage3;
 
           HubTile.Count = 12;
       }



If I do this :

var tilesmedium = new TileMedium { Count = 7 };
 
var flipTileData = new RadFlipTileData()
            {
                WideVisualElement = tilesmedium ,
                SmallVisualElement = tilesmedium ,
                VisualElement = tilesmedium ,
                IsTransparencySupported = false,
                MeasureMode = MeasureMode.Tile
            };
 
 
LiveTileHelper.CreateOrUpdateTile(flipTileData, new Uri("/", UriKind.Relative), true);


The image is shown, but the count is not. If I show the control on the scree, then make the Tile, it is showing. But I don't want the user to see it.

IS there something I missed ?

Thanks

Regards

Olivier Matis

1 Answer, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 26 Aug 2013, 01:11 PM
Hi Oliver,

Yes, the Hub Tile needs to be loaded so that it has all its information visualized before it is used by LiveTileHelper. If you don't want your users to see the hub tile, you can set its Margin to be big enough, so that it gets out of the visible area in your application.

I hope this information helps.
 
Regards,
Todor
Telerik
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
Tags
LiveTileHelper
Asked by
GuruuMeditation
Top achievements
Rank 1
Answers by
Todor
Telerik team
Share this question
or