0
以下作品是树形在不工作
<Style TargetType="TreeViewItem">
<Setter Property="IsExpanded"
Value="{Binding Path=IsExpanded, Mode=TwoWay}" />
中的树型视图样式的绑定IsExpanded到templatedParent这并不因为它是在不同的资源为树型视图风格
<ToggleButton x:Name="Expander" Style="{StaticResource TreeViewExpandCollapseToggleStyle}" ClickMode="Press" IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent},Mode=TwoWay}"/>
请让我知道哪里出了问题