2 posts, 0 answers
  1. Neha
    Neha avatar
    2 posts
    Member since:
    Dec 2012

    Posted 24 Dec 2012 Link to this post



    I am using Silverlight Telerik RadTreeListView control, I want to set the margin of all nodes (parent & child). 
     1. want to reduce the space between ExpanderControl (in my case it is +/- sign) and Node's Text. (Horizontal Space) 
     2. want to adjust the margin of child elements. (mainly, Left margin) 
     3. want to reduce the space between All the items. (mainly, Top margin - Vertical Space)

    My xaml code is as below.


    <Grid x:Name="LayoutRoot”>


                <Style x:Name="buttonStyle" TargetType="telerik:GridViewToggleButton">

                    <Setter Property="PresentationMode" Value="PlusMinus" />



            <telerik:RadTreeListView x:Name="rtSalesInvoicingMenu" ItemsSource="{Binding TreeNodes, Mode=TwoWay}" RowIndicatorVisibility="Collapsed" ShowColumnHeaders="False" AutoGenerateColumns="False" GridLinesVisibility="None" IsReadOnly="True" CanUserFreezeColumns="False" RowLoaded="SalesInvoicingMenu_RowLoaded" CurrentCellChanged="SalesInvoicingMenu_CurrentCellChanged" HierarchyExpandButtonStyle="{StaticResource buttonStyle}" Margin="0" Padding="0" BorderBrush="{x:Null}">


                    <telerik:TreeListViewTableDefinition ItemsSource="{Binding Children, Mode=TwoWay}" />



                    <telerik:GridViewDataColumn DataMemberBinding="{Binding LocalisedText, Mode=TwoWay}" />





    Can anyone guide me??

  2. Dimitrina
    Dimitrina avatar
    3769 posts

    Posted 24 Dec 2012 Link to this post


    As to your questions:
    1. Unfortunately currently this could not be done. 
    2, 3 You can define an implicit Style targeting GridViewCell similar to:

    <Style TargetType="telerik:GridViewCell">
       <Setter Property="HorizontalContentAlignment" Value="Left"/>
       <Setter Property="Padding" Value="0"/>
       <Setter Property="Margin" Value="0"/>

    Then please set s smaller RowHeight for the TreeListView.

    I hope this helps you to achieve your goal.

    Kind regards,
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top