Question

How can I change the triangle shape next to the expandable TreeViewItem in the XAML below?

<Grid>
    <TreeView>
        <TreeViewItem  Header="Columns" IsExpanded="True">
            <TreeViewItem Header="Model" IsSelected="True"/>
            <TreeViewItem Header="Layout"/>
            <TreeViewItem Header="Elevations"/>
        </TreeViewItem>
        <TreeViewItem Header="Beams/Floors" IsExpanded="True">
            <TreeViewItem Header="Model"/>
            <TreeViewItem Header="Layout"/>
            <TreeViewItem Header="Elevations"/>
        </TreeViewItem>
        <TreeViewItem Header="Foundation" IsExpanded="True">
            <TreeViewItem Header="Model"/>
            <TreeViewItem Header="Layout"/>
        </TreeViewItem>
        <TreeViewItem Header="Walls" IsExpanded="True">
            <TreeViewItem Header="Model"/>
            <TreeViewItem Header="Layout"/>
            <TreeViewItem Header="Elevations"/>
        </TreeViewItem>
    </TreeView>
</Grid>

enter image description here

Was it helpful?

Solution

Here is the template of the TreeView. You can see in the template the style ExpandCollapseToggleStyle in which there are two Path named Collapsed and Expanded. You can change them as you wish.

OTHER TIPS

you can use the mentioned link Change Icon

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top