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

RadTileView and Scrollbar

10 Answers 210 Views
TileView
This is a migrated thread and some comments may be shown as answers.
Halász Levente
Top achievements
Rank 1
Halász Levente asked on 13 Aug 2010, 01:10 PM
Dear Everybody,

After spending more than 5 hours figuring out how could I make RadTileView not to shrink my tiles but show the scrollbar if needed, I'd like to share some info with you:
- Reading Kiril Stanoev's article, when he says "If the sum of the minimized heights/widths of all minimized TileViewItems exceeds the available space,RadTileView will show a ScrollBar allowing you to scroll the minimized items." he means MinimizedHeight and MinimizedWidth property of the RadTileViewItem instance. Also this sentence applies only when the TileView state is One (One big item, and the rest is small). It took me a while to figure this out, it might be my bad English, or I'm just a little bit distracted right now, but thought it I mention it, just in case someone else miss understands this. 
- Also don't apply the Windows7 theme (telerik:StyleManager.Theme="Windows7"), because it'l neutralize you're ItemContainerStyle settings.
<telerik:RadTileView.ItemContainerStyle>
     <Style TargetType="telerik:RadTileViewItem">
        <Setter Property="MinimizedHeight" Value="300" />
     </Style>
</telerik:RadTileView.ItemContainerStyle>

 If you must use Windows7 theme (though did not check with the other themes), handle the TilesStateChanged event like this.

private void tileView1_TilesStateChanged(object sender, Telerik.Windows.RadRoutedEventArgs e)
        {
            foreach (var t in ((RadTileView)e.OriginalSource).ChildrenOfType<RadTileViewItem>())
            {
                ((RadTileViewItem)t).minimizedheight = 150;
            }
            tileView1.UpdateItemsSizeAndPosition();
        }

Don't forget to call UpdateItemsSizeAndPosition, else the changes will not be applied until you modify the layout (resize, tile state change etc.).

Best regards,

Levente

10 Answers, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 18 Aug 2010, 01:38 PM
Hello Halász Levente,

Thank you for your feedback. We'll highgly appreciate any additional comments on the blog post.

Best wishes,
Tina Stancheva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Tina Stancheva
Telerik team
answered on 18 Aug 2010, 01:39 PM
Hello Halász Levente,

Thank you for your feedback. We'll highly appreciate any additional comments on the blog post.

Thank you again.

Best wishes,
Tina Stancheva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Halász Levente
Top achievements
Rank 1
answered on 19 Aug 2010, 06:04 AM
Meanwhile I found the solution for the theming. It seems that if you apply the Windows7 (or any other theme) before you set your own style setting, then it'll be ok.
0
Tina Stancheva
Telerik team
answered on 24 Aug 2010, 02:36 PM
Hello Halász Levente,

I couldn't reproduce the theme issue you described. Can you please elaborate on it a bit more? What do you mean by "because it'll neutralize you're ItemContainerStyle settings."? And also how do you define "apply the Windows7 (or any other theme) before you set your own style setting"?

We will highly appreciate your help on that. Thank you in advance.

Sincerely yours,
Tina Stancheva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Halász Levente
Top achievements
Rank 1
answered on 25 Aug 2010, 11:04 AM
Hello,

What I meant is this
<telerik:RadTreeListView x:Name="radTreeListView"
                                 ItemsSource="{Binding OfficeServices}"                        
                                telerik:StyleManager.Theme="Windows7"
                                 Style="{StaticResource DraggableRadTreeListView}"  
                                 >

This way it works as it should, my style is applied, if I change the order like this:
<telerik:RadTreeListView x:Name="radTreeListView"
                                 ItemsSource="{Binding OfficeServices}" 
Style="{StaticResource DraggableRadTreeListView}"                     
                            telerik:StyleManager.Theme="Windows7"
                                    
                                 >

This way, all of my style settings will be overwritten by Windows7 style settings, so it will not get the desired functionality. Don't think you can do anything about it, it is the way it works. Sorry but did not realize this at my first attempt.

Regards,

Levente
0
Tina Stancheva
Telerik team
answered on 27 Aug 2010, 05:06 PM
Hi Halász Levente,

Thank you for the clarification.

You are indeed right. However, I will try to clarify what is causing the behaviour you descibed.

In Silverlight setting a theme to a RadControl is like setting a style to that control. Therefore when you set the Style property of a RadControl and you also define a Theme for it, both styles will be applied during the initialization of the control in the order they are set in its definition.
So let's say that in the definition of the RadTileView you set Style and Theme in that particular order. What happens is - on initialization firstly the Style is applied to the RadTileView, then the Theme. Therefore, the style defined in the Theme overwrites the other style.

Also, the ItemContainerStyle is always applied before the Theme. Therefore if you want to set both a theme to a RadControl and an ItemContainerStyle, you will need to set an application theme instead since the application themes allow defining an ItemContainerStyle to the RadControls.

I hope this information helps.

Sincerely yours,
Tina Stancheva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Josh King
Top achievements
Rank 2
answered on 15 Dec 2010, 06:54 PM
I'm having trouble applying the Windows7 them to the RadTileView control.  Is there a trick to it?  Does it have to be an application setting?

Thanks
0
Zarko
Telerik team
answered on 20 Dec 2010, 02:49 PM
Hi Josh King,

I tried to apply the theme in both xaml with telerik:StyleManager.Theme="Windows7" and in code-behind with StyleManager.SetTheme(this.myTileView, new Windows7Theme()); and everything is working fine for me, so could you tell me a little bit more about your problem( maybe give me a code snippet or a sample project )?

Best wishes,
Zarko
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Josh King
Top achievements
Rank 2
answered on 20 Dec 2010, 04:02 PM
I have it wrapped in a BusyIndicator and Border.  Would that make a difference?  Here's a code snippet:

<telerik:RadBusyIndicator x:Name="busyIndicator" Grid.Row="4" Grid.Column="0" telerik:StyleManager.Theme="Windows7">
            <Border CornerRadius="6" telerik:StyleManager.Theme="Windows7">
                <telerik:RadTileView x:Name="tileView" MaximizeMode="One" TileStateChangeTrigger="SingleClick" telerik:StyleManager.Theme="Windows7"
                            MinimizedColumnWidth="180" ItemsSource="{Binding}" TilesStateChanged="tileView_TilesStateChanged" TileStateChanged="tileView_TileStateChanged">
                    <telerik:RadTileView.ItemContainerStyle>
                        <Style TargetType="telerik:RadTileViewItem">
                            <Setter Property="MinimizedHeight" Value="125" />
                        </Style>
                    </telerik:RadTileView.ItemContainerStyle>
                    <telerik:RadTileView.ItemTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding AnalysisName, Mode=OneWay}" FontWeight="Bold" Foreground="{Binding HeaderColor}" />
                        </DataTemplate>
                    </telerik:RadTileView.ItemTemplate>
                    <telerik:RadTileView.ContentTemplate>
0
Josh King
Top achievements
Rank 2
answered on 20 Dec 2010, 05:13 PM
Nevermind....  I didn't have the Windows7 Theme dll referenced.  I forgot about that part.  
Tags
TileView
Asked by
Halász Levente
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Halász Levente
Top achievements
Rank 1
Josh King
Top achievements
Rank 2
Zarko
Telerik team
Share this question
or