Correction to Expander Style of BureauBlue theme

Oct 23, 2009 at 11:42 PM
Edited Oct 23, 2009 at 11:43 PM

I think a Padding attribute should be added to the Border of the Expander style's control template. Without it, the content presenter goes right up to the edge of the border, which looks bad. I realize you could do this with margin, but I believe padding is a more natural way to do it.

Here's how the Border element would look after the change.

                                <Border
                                    Visibility="Collapsed"
                                    x:Name="border"
                                    Margin="1,1,1,1"
                                    Padding="{TemplateBinding Padding}"
                                    BorderBrush="{DynamicResource GlyphBrush}"
                                    BorderThickness="1,1,1,1"
                                    CornerRadius="1,1,1,1"
                                    Background="{DynamicResource ControlBackgroundBrush}">
                                    <ContentPresenter
                                        Focusable="false"
                                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                        Margin="1,1,1,1"
                                        x:Name="ExpandSite"
                                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                        DockPanel.Dock="Bottom" /><!--Added padding to border - Dan M.-->
                                </Border>