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

Tile can not be made smaller 167 px

4 Answers 32 Views
TileView
This is a migrated thread and some comments may be shown as answers.
HDC
Top achievements
Rank 1
HDC asked on 19 Oct 2012, 02:14 PM
Hi

I have following tileview:

<telerik:RadTileView x:Name="PhotoTiles"
                                               ItemsSource="{Binding PagedSource, ElementName=myDataPager}"
                                               TilesStateChanged="RadTileViewTilesStateChanged"
                                               Grid.Column="0" Grid.Row="1"
                                               PreservePositionWhenMaximized ="True"
                                               telerik:TileViewPanel.IsVirtualized ="True"
                                               IsAutoScrollingEnabled="True"
                                               TileStateChangeTrigger ="SingleClick"
                                               MinimizedColumnWidth ="167"
                                               MinimizedRowHeight ="120"                                              
                                               ColumnWidth = "167"     
                                               RowHeight ="120"
                                               MaximizeMode = "ZeroOrOne"
                                               MinimizedItemsPosition="Bottom"
                                               SelectionMode="Single"
                                               IsSelectionEnabled="True"                                              
                                                
                                               >
                  <telerik:RadTileView.ItemTemplate>
                    <DataTemplate telerik:ContainerBinding.ContainerBindings="{StaticResource bindings}">
                      <TextBlock Text="{Binding Name}" />
                    </DataTemplate>
                  </telerik:RadTileView.ItemTemplate>
                  <telerik:RadTileView.ContentTemplate>
                    <DataTemplate>
                      <telerik:RadFluidContentControl ContentChangeMode="Automatic" TransitionDuration="0:0:.5" State="{Binding State, Converter={StaticResource tileConverter}}" >                         
                        <telerik:RadFluidContentControl.Content>
                          <ContentPresenter Content="{Binding Converter={StaticResource myConverter}}" />                         
                        </telerik:RadFluidContentControl.Content>                         
                        <telerik:RadFluidContentControl.LargeContent>
                          <Image x:Name="LargeImage" Tag="{Binding Tag}" Source ="{Binding Image}" Stretch="Uniform" Loaded="ImageLoaded"/>
                        </telerik:RadFluidContentControl.LargeContent>
                      </telerik:RadFluidContentControl>
                    </DataTemplate>
                  </telerik:RadTileView.ContentTemplate>
                </telerik:RadTileView>

The tileview contains pictures.

Everything works ok just as long as i make the tilewidth larger or equal to 167

If i make the tilewidth < 167, the tiles don't show any pictures anymore. I can make em as big as i want, but not smaller then 167. This is an enoying problem and i don't see how it could be related to my code, since i can even make the images themselves smaller then 167, but i can not make the tiles any smaller.

Is there a build in limit width?

Best Regards,

Peter

4 Answers, 1 is accepted

Sort by
0
Pavel R. Pavlov
Telerik team
answered on 23 Oct 2012, 01:03 PM
Hi Peter,

We could not reproduce the issue that you described. Can you please elaborate on what are the ContainerBindings bound to? It will be best if you can send us your project so we can understand your scenario better.

Also you can take a look at the attached project to see if the issue can be reproduced in it.

Regards,
Pavel R. Pavlov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
HDC
Top achievements
Rank 1
answered on 25 Oct 2012, 02:03 PM
Hi Pavel,

It seems i just needed to add the SmallContent template to the RadFluidContentControl to fix the problem.

It is strange that you don't need it with a size bigger then 167, but maybe this was code into the RadFluidContentControl?

Best Regards,

Peter
0
Accepted
Pavel R. Pavlov
Telerik team
answered on 29 Oct 2012, 01:44 PM
Hi Peter,

We have noticed that you have set the RadFluidContentControl ContentChangeMode property to Automatic.  By doing so, you're saying that the control will change its state based on its threshold properties. And as the switch between the normal and small content is controlled by the NormalToSmallThreshold property and its default value is 150x150 pixels, as soon as the control gets smaller that this threshold it will display its SmallContent. And if there is no SmallContent defined  the control will not be able to show any content.

However, as you're using the control inside a RadTileView and you need to synchronize the TileState with the State of the RadFluidContentControl, it will be best if the ContentChangeMode property of the FluentContentControl is set to Manual and you change it's state when the TileStateChanged event is invoked. This approach is demonstrated in this article. If you use data-binding scenario it will be even better if you bind the State of the RadFluidContentControl to the TileState of the RadTileViewItem as demonstrated in this article.

Regards,
Pavel R. Pavlov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
HDC
Top achievements
Rank 1
answered on 30 Oct 2012, 01:58 PM
Hi Pavel,

I will keep it in mind next time i need to use this component. I feel that the fact that it does not show anything with SmallContent missing is reason to raise somekind of error to the developer. But i don't know enough of the code to really judge on that.

Now that i know, i can watch out for this problem.

Thanks for the explanation.

Best Regards,

Peter
Tags
TileView
Asked by
HDC
Top achievements
Rank 1
Answers by
Pavel R. Pavlov
Telerik team
HDC
Top achievements
Rank 1
Share this question
or