Count not showing

2 posts, 0 answers
  1. GuruuMeditation
    GuruuMeditation avatar
    4 posts
    Member since:
    May 2010

    Posted 21 Aug 2013 Link to this post

    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
  2. Todor
    Admin
    Todor avatar
    778 posts

    Posted 26 Aug 2013 Link to this post

    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.
  3. DevCraft banner
Back to Top