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

Tile's Invisible after applying Group Template

11 Answers 239 Views
TileList
This is a migrated thread and some comments may be shown as answers.
Patrick
Top achievements
Rank 2
Patrick asked on 25 Apr 2013, 07:21 PM
I tried applying Michael Crump's Blog Post, here, to my own code.  Particularly the Group Template stuff.  I now have two Groups shown but my Tiles all disappeared. 

Below is my XAML, what am I doing wrong, everything seems to match up with what he is showing and my Tile's all displayed before I applied the Group stuff.

<Window x:Name="ShellWindow"
        x:Class="Green.ShellView"
        xmlns:cal="http://www.caliburnproject.org">
    <Window.Resources>
        <DataTemplate x:Key="GroupTemplate">
            <TextBlock Text="{Binding}"
                       Foreground="Gray"
                       Margin="20"
                       FontWeight="Bold"
                       FontSize="20"
                       FontFamily="Segoe UI"/>
        </DataTemplate>
        <Style TargetType="telerik:Tile">
            <Setter Property="Margin"
                    Value="20,15,5,0"/>
        </Style>
        <Style TargetType="TextBlock"
               x:Key="TileLabelStyle">
            <Setter Property="FontSize"
                    Value="14"/>
            <Setter Property="FontFamily"
                    Value="Segoe UI"/>
            <Setter Property="Margin"
                    Value="10"/>
            <Setter Property="Foreground"
                    Value="White"/>
            <Setter Property="VerticalAlignment"
                    Value="Bottom"/>
        </Style>
        <Style TargetType="TextBlock"
               x:Key="LiveTileLabelStyle">
            <Setter Property="FontSize"
                    Value="24"/>
            <Setter Property="FontFamily"
                    Value="Segoe UI"/>
            <Setter Property="Margin"
                    Value="5"/>
            <Setter Property="Foreground"
                    Value="White"/>
            <Setter Property="VerticalAlignment"
                    Value="Center"/>
            <Setter Property="HorizontalAlignment"
                    Value="Center"/>
        </Style>
    </Window.Resources>
    <telerik:RadDockPanel x:Name="LayoutRoot"
                          LastChildFill="True">
        <telerik:RadExpander x:Name="UserInfoContainer"
                             ExpandDirection="Up"
                             IsExpanded="True"
                             telerik:RadDockPanel.Dock="Top">
            <telerik:RadExpander.Header>
                <Grid HorizontalAlignment="Stretch">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <telerik:Label Content="User Information"/>
                    <Rectangle Grid.Column="1"
                               Height="2"
                               Margin="5,0,0,0"
                               VerticalAlignment="Center"
                               Fill="Gray"/>
                </Grid>
            </telerik:RadExpander.Header>
            <telerik:RadExpander.Content>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="Good Day Sir!!!"/>
                    <Ellipse Width="33"
                             Height="33"
                             Margin="5"
                             Fill="Yellow"/>
                    <Ellipse Width="33"
                             Height="33"
                             Margin="5"
                             Fill="Blue"/>
                    <Ellipse Width="33"
                             Height="33"
                             Margin="5"
                             Fill="Red"/>
                </StackPanel>
            </telerik:RadExpander.Content>
        </telerik:RadExpander>
        <telerik:RadTileList x:Name="AppLaunchPad"
                             GroupTemplate="{StaticResource GroupTemplate}"
                             ScrollViewer.HorizontalScrollBarVisibility="Visible"
                             cal:Message.Attach="[Event SelectionChanged] = [Action OpenDoorway($eventArgs)]">
            <telerik:Tile x:Name="PendingAuthTile"
                          Background="BlueViolet"
                          TileType="Single"
                          Group="First">
                <Grid>
                    <TextBlock Text="Pending"
                               Style="{StaticResource TileLabelStyle}"/>
                    <TextBlock x:Name="PendingAuthCount"
                               Text="0"
                               Style="{StaticResource LiveTileLabelStyle}"/>
                </Grid>
            </telerik:Tile>
            <telerik:Tile x:Name="CreateAuthTile"
                          Group="First"
                          Background="Green"
                          TileType="Single"
                          cal:Message.Attach="[Event MouseDoubleClick] = [Action CreateAuth] ">
                <TextBlock Text="Create"
                           Style="{StaticResource TileLabelStyle}"/>
            </telerik:Tile>
            <telerik:Tile x:Name="ModifyAuthTile"
                          Group="Second"
                          Background="CadetBlue"
                          TileType="Single">
                <TextBlock Text="Modify"
                           Style="{StaticResource TileLabelStyle}"/>
            </telerik:Tile>
            <telerik:Tile x:Name="DeleteAuthTile"
                          Group="Second"
                          Background="Sienna"
                          TileType="Single">
                <TextBlock Text="Delete"
                           Style="{StaticResource TileLabelStyle}"/>
            </telerik:Tile>
        </telerik:RadTileList>
    </telerik:RadDockPanel>
</Window>



Thanks,

11 Answers, 1 is accepted

Sort by
0
Yordanka
Telerik team
answered on 26 Apr 2013, 07:10 AM
Hi Patrik,

Thank you for the feedback.

I am not sure what is the problem you report. Could you send us a screenshot or a video with demonstrating it?
 
Regards,
Yordanka
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Patrick
Top achievements
Rank 2
answered on 30 Apr 2013, 01:21 PM
I've narrowed it down to this code:
<Style TargetType="telerik:Tile">
     <Setter Property="Margin" Value="5"/>
</Style>

Not sure what I'm doing wrong but when that Style is in my Resources my Tiles all disappear.  I attached two images to illustrate this as best as I can.
0
Yordanka
Telerik team
answered on 30 Apr 2013, 04:08 PM
Hi Patrick,

I am still not able to reproduce the problem you report. Could you check the attached test project and modify it in order to show the problem? Also, describing the steps you took to achieve it will be plus.
 
Greetings,
Yordanka
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Patrick
Top achievements
Rank 2
answered on 30 Apr 2013, 07:11 PM
Thanks, I have downloaded it and tested it.  It works for me with the one you sent.  I seem to have narrowed it down to my use of Implicit Theming as that is the only difference between our two apps at this point.

<Application x:Class="Green.App"
    xmlns:local="clr-namespace:Green">
    <Application.Resources>
      <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary>
                    <local:AppBootstrapper x:Key="bootstrapper" />
                </ResourceDictionary>
                <ResourceDictionary Source="/Telerik.Windows.Themes.Windows8;component/Themes/System.Windows.xaml"/>
                <ResourceDictionary Source="/Telerik.Windows.Themes.Windows8;component/Themes/Telerik.Windows.Controls.xaml"/>
                <ResourceDictionary Source="/Telerik.Windows.Themes.Windows8;component/Themes/Telerik.Windows.Controls.Input.xaml"/>
                <ResourceDictionary Source="/Telerik.Windows.Themes.Windows8;component/Themes/Telerik.Windows.Controls.Navigation.xaml"/>
                <ResourceDictionary Source="/Telerik.Windows.Themes.Windows8;component/Themes/Telerik.Windows.Controls.Docking.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>
</Application>

and then I have a Reference to 2013.1.403.45.NoXaml\Telerik.Windows.Themes.Windows8.dll
0
Accepted
Vanya Pavlova
Telerik team
answered on 01 May 2013, 09:34 AM
Hello Patrick,


In general you should base your style on the defined within Telerik.Windows.Controls.xaml, as follows:

<Style  TargetType="telerik:Tile" BasedOn="{StaticResource TileStyle}">
        <Setter Property="Margin" Value="5"/>
</Style>


This is a general guideline when you use implicit themes, you should base the simple styles, however they will be cleared and nothing will appear.


Have a great day!


Greetings, Vanya Pavlova
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Patrick
Top achievements
Rank 2
answered on 01 May 2013, 12:23 PM
Thanks for that tip!

Unfortunately I get "XAML: Resource 'TileStyle' is not found"  

Did I miss a step to make this work?

<Style TargetType="telerik:Tile" BasedOn="{StaticResource TileStyle}">
     <Setter Property="Margin" Value="5" />
</Style>
0
Yordanka
Telerik team
answered on 01 May 2013, 12:30 PM
Hi Patrick,

Please, find a working project in the attached file.
 
Regards,
Yordanka
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Patrick
Top achievements
Rank 2
answered on 01 May 2013, 12:54 PM
Hi Yordanka,

Thank you all for all of your assistance.  

Your project has the same issue for me, which is a Design Time issue that doesn't prevent you from running the app.  I have verified this is working for me despite the Just Code note that it's not found.  If you are curious I included a screenshot attachment of what I'm reffering to.

Thanks again, seems like I'm good....for now :)

0
Vanya Pavlova
Telerik team
answered on 01 May 2013, 01:27 PM
Hello Patrick,



It sounds like design-time related problem to Visual Studio 2010. We were able to reproduce it only inside VS 2010 environment. If you are using Visual Studio 2012 the resource will be correctly resolved as you may see at the attached picture.
Can you verify whether you are using Visual Studio 2010 or Visual Studio 2012 with dark color scheme?




All the best,
Vanya Pavlova
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Patrick
Top achievements
Rank 2
answered on 02 May 2013, 03:07 AM
Thanks for the follow up.  I am using VS2012 with the Dark Theme.
0
Vanya Pavlova
Telerik team
answered on 02 May 2013, 07:29 AM
Hi Patrick,



Thank you for getting back to us again! We have tested your own project on several machines with Visual Studio 2012 with dark color scheme set. We get the same result, exhibited in the attachment as part of my previous reply. In general, this error will appear if the corresponding resource dictionary is not correctly merged in order to serve the desired design-time support. Since we cannot reproduce the same in VS 2012 environment as you do I am afraid that we cannot provide much help in this case as we cannot reproduce the same by our side.




Regards,
Vanya Pavlova
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
TileList
Asked by
Patrick
Top achievements
Rank 2
Answers by
Yordanka
Telerik team
Patrick
Top achievements
Rank 2
Vanya Pavlova
Telerik team
Share this question
or