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

Change the line of treeview

5 Answers 85 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
liu
Top achievements
Rank 1
liu asked on 23 Nov 2010, 03:16 AM
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.

5 Answers, 1 is accepted

Sort by
0
Kiril Stanoev
Telerik team
answered on 23 Nov 2010, 01:52 PM
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
0
liu
Top achievements
Rank 1
answered on 06 Dec 2010, 11:44 AM
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>
0
liu
Top achievements
Rank 1
answered on 08 Dec 2010, 02:29 AM
Wish your reply.Thanks.
0
Petar Mladenov
Telerik team
answered on 09 Dec 2010, 11:13 AM
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
0
liu
Top achievements
Rank 1
answered on 09 Dec 2010, 11:35 AM
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
Tags
TreeView
Asked by
liu
Top achievements
Rank 1
Answers by
Kiril Stanoev
Telerik team
liu
Top achievements
Rank 1
Petar Mladenov
Telerik team
Share this question
or