Domanda

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

È stato utile?

Soluzione

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.

Altri suggerimenti

you can use the mentioned link Change Icon

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top