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

Positioning content

4 Answers 53 Views
TileList
This is a migrated thread and some comments may be shown as answers.
Juzailie
Top achievements
Rank 2
Juzailie asked on 06 Sep 2013, 04:29 AM
I need to position all child of  RadTileList to the center, I already try with HorizontalContentAlignment and set it to Center the content (i mean the child) still positioned on the left, why is that happen

4 Answers, 1 is accepted

Sort by
0
David
Top achievements
Rank 1
answered on 28 Oct 2013, 03:24 PM
Same problem here.
All tiles are pushed to the left. 
Would love to have them centered.
0
Maya
Telerik team
answered on 31 Oct 2013, 01:20 PM
Hello David,

You can modify the template of the tile list by changing HorizontalContentAlignment of the ScrollViewer:

<ScrollViewer x:Name="PART_ScrollViewer" Margin="0"
                          CanContentScroll="True"
               telerik:StyleManager.Theme="{StaticResource Theme}"
                           Padding="{TemplateBinding Padding}"
                           Background="{TemplateBinding Background}"
                           BorderBrush="{TemplateBinding BorderBrush}"
                           BorderThickness="{TemplateBinding BorderThickness}"
                         HorizontalContentAlignment="Center"
                           HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                           VerticalScrollBarVisibility="Hidden">


Regards,
Maya
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
David
Top achievements
Rank 1
answered on 06 Nov 2013, 11:32 AM
Unfortunately, the right side of the tile list is cut off when setting the HorizontalContentAlignment to anything but Stretch.
0
Vanya Pavlova
Telerik team
answered on 11 Nov 2013, 11:10 AM
Hi Juzalie,

 

In fact, there is not enough space to display both columns, that Tiles formed. What you may do is restrict the ScrollViewer, as proposed below:

<ScrollViewer x:Name="PART_ScrollViewer" MinWidth="650" HorizontalAlignment="Center" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CanContentScroll="True" HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" Margin="0" Padding="{TemplateBinding Padding}" VerticalScrollBarVisibility="Hidden">
                                <telerik:StyleManager.Theme>
                                    <telerik:Office_BlackTheme/>
                                </telerik:StyleManager.Theme>
                                <ItemsPresenter/>
                            </ScrollViewer>


Another option would be to change the Width of the Tiles to a smaller value than the default one using implicit style.  
 
 
Regards,
Vanya Pavlova
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
TileList
Asked by
Juzailie
Top achievements
Rank 2
Answers by
David
Top achievements
Rank 1
Maya
Telerik team
Vanya Pavlova
Telerik team
Share this question
or