Change the line of treeview

6 posts, 0 answers
  1. liu
    liu avatar
    7 posts
    Member since:
    Jul 2010

    Posted 22 Nov 2010 Link to this post

    Hi,I want to change the line to dashline . But there is a line I can't control it.
    There are three lines I can control, and there is another line I can't control, you can see the image attached.
  2. Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1511 posts

    Posted 23 Nov 2010 Link to this post

    Hi liu,

    Please take a look at the attached project and let me know whether it helps. I'd be glad to further assist you.

    All the best,
    Kiril Stanoev
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
  3. DevCraft banner
  4. liu
    liu avatar
    7 posts
    Member since:
    Jul 2010

    Posted 06 Dec 2010 Link to this post

    Thanks,appriciate for your kind answer.There's another problem,your treeview send to me is two-level,so I add a level and make it be three-level.Then there's a inconsistent line that I add it in the attachment,now what should I do if I want to change the style of line.This work is very important and please help me.Thanks.
    Notice:I can't send the whole project,so I add the code here,I have added the third level in the code, the picture added in the attachment is the result I run this project.

    Waiting for your answer.Thanks.
    <Grid x:Name="LayoutRoot" >
            <telerik:RadTreeView x:Name="radTreeView" 
                                 IsLineEnabled="True"
                                 IsRootLinesEnabled="True"
                                 ExpanderStyle="{StaticResource MyExpanderStyle}" >           
                <telerik:RadTreeViewItem Header="Category1" Style="{StaticResource RadTreeViewItemStyle}">
                    <telerik:RadTreeViewItem Header="Product1" Style="{StaticResource RadTreeViewItemStyle}"/>
                    <telerik:RadTreeViewItem Header="Product2" Style="{StaticResource RadTreeViewItemStyle}"/>
                    <telerik:RadTreeViewItem Header="Product3" Style="{StaticResource RadTreeViewItemStyle}"/>
                </telerik:RadTreeViewItem>
                <telerik:RadTreeViewItem Header="Category2" Style="{StaticResource RadTreeViewItemStyle}"/>
                <telerik:RadTreeViewItem Header="Category3" Style="{StaticResource RadTreeViewItemStyle}"/>
                <telerik:RadTreeViewItem Header="Category4" IsExpanded="True" Style="{StaticResource RadTreeViewItemStyle}">
                    <telerik:RadTreeViewItem Header="Product A" Style="{StaticResource RadTreeViewItemStyle}"/>
                    <telerik:RadTreeViewItem Header="Product B"  Style="{StaticResource RadTreeViewItemStyle}"/>
                    <telerik:RadTreeViewItem Header="Product C" IsExpanded="True" Style="{StaticResource RadTreeViewItemStyle}">
                        <!--The third level I added-->
                        <telerik:RadTreeViewItem Header="haha" Style="{StaticResource RadTreeViewItemStyle}"/>
                        <telerik:RadTreeViewItem Header="sldk" Style="{StaticResource RadTreeViewItemStyle}"/>
                        <telerik:RadTreeViewItem Header="this"  Style="{StaticResource RadTreeViewItemStyle}"/>
                        <telerik:RadTreeViewItem Header="right"  Style="{StaticResource RadTreeViewItemStyle}"/>
                        <telerik:RadTreeViewItem Header="ok"  Style="{StaticResource RadTreeViewItemStyle}"/>
                        <telerik:RadTreeViewItem Header="again"  Style="{StaticResource RadTreeViewItemStyle}"/>
                    </telerik:RadTreeViewItem>
                    <telerik:RadTreeViewItem Header="Product B"  Style="{StaticResource RadTreeViewItemStyle}"/>
                    <telerik:RadTreeViewItem Header="Product C"  Style="{StaticResource RadTreeViewItemStyle}"/>
                </telerik:RadTreeViewItem>
                <telerik:RadTreeViewItem Header="Category5" Style="{StaticResource RadTreeViewItemStyle}"/>
            </telerik:RadTreeView>
        </Grid>
  5. liu
    liu avatar
    7 posts
    Member since:
    Jul 2010

    Posted 07 Dec 2010 Link to this post

    Wish your reply.Thanks.
  6. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 09 Dec 2010 Link to this post

    Hi liu,

    I am unable to reproduce your issue in my project. Could you please take a look at it and let me know if I am missing something ? Thank you in advance for your cooperation.

    Kind regards,
    Petar Mladenov
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
  7. liu
    liu avatar
    7 posts
    Member since:
    Jul 2010

    Posted 09 Dec 2010 Link to this post

    Hi,thanks your answer first.
    The problem:
    I change the color of IndentFirstVerticalLine, the code such as:
    <Rectangle x:Name="IndentFirstVerticalLine"
                           Visibility="{Binding ElementName=VerticalLine, Path=VerticalAlignment,Converter={StaticResource VisibilityConverter}}"
                           StrokeDashArray="4,2" HorizontalAlignment="Center"
                           Stroke="Red" Width="1" Grid.Row="1">
                    <Rectangle.Clip>
                        <RectangleGeometry Rect="0,0,1,10000"/>
                    </Rectangle.Clip>
                </Rectangle>

    Then I run this project,The line is gone.
    Thanks
Back to Top
DevCraft banner