WPF Expander style

    
            
            
            
            
            
            

使用Expander的示例:

 "ExpanderTools" Style="{DynamicResource ExpanderStyleOne}" IsExpanded="True" ExpandDirection="Down">
                    
                        "ExpanderToolsHeaderGrid">
                            
                                "2"/>
                                "40"/>
                                "40"/>
                                "40"/>
                                "40"/>
                                "40"/>
                                "40"/>
                                "2"/>
                            
                            
                                "5"/>
                                "40"/>
                                "5"/>
                                
                            
                            "1" Grid.Row="1"  />
                            "2" Grid.Row="1" />
                            

运行效果:

WPF Expander style_第1张图片

需要注意的是:Expander展开后,有可能会出现Expander内容区域范围到达其他内容区域时,显示其他区域的内容,造成交叉背景显示。

此时需要将被当区域控件的 Panel.ZIndex="-1" 该值设置为负数。

转载于:https://www.cnblogs.com/runningRain/p/8946035.html

你可能感兴趣的:(WPF Expander style)