Positioning content

5 posts, 0 answers
  1. Juzailie
    Juzailie avatar
    20 posts
    Member since:
    Apr 2013

    Posted 05 Sep 2013 Link to this post

    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
  2. David
    David avatar
    6 posts
    Member since:
    Jun 2013

    Posted 28 Oct 2013 Link to this post

    Same problem here.
    All tiles are pushed to the left. 
    Would love to have them centered.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 31 Oct 2013 Link to this post

    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 >>
  5. David
    David avatar
    6 posts
    Member since:
    Jun 2013

    Posted 06 Nov 2013 Link to this post

    Unfortunately, the right side of the tile list is cut off when setting the HorizontalContentAlignment to anything but Stretch.
  6. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 11 Nov 2013 Link to this post

    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 >>
Back to Top
UI for WPF is Visual Studio 2017 Ready