MaterialDesignInXAML / MaterialDesignInXamlToolkit

Google's Material Design in XAML & WPF, for C# & VB.Net.
http://materialdesigninxaml.net
MIT License
15.18k stars 3.43k forks source link

Fix 3357: Card double padding #3589

Closed StefanoRivolta-Previero closed 5 months ago

StefanoRivolta-Previero commented 5 months ago

Fix for bug explained in #3357 which was introduced in #3118

With the fix now this code works correctly:

<StackPanel Grid.Column="1" HorizontalAlignment="Center"  VerticalAlignment="Center">
  <materialDesign:Card  Width="100" Height="100" Padding="6">
    <Border Background="red"/>
  </materialDesign:Card>
  <Border Background="{StaticResource MaterialDesign.Brush.Card.Background}"
          Width="100" Height="100" CornerRadius="4" Margin="0 10 0 0" Padding="6"
          Effect="{StaticResource MaterialDesignElevationShadow1}">
    <Border Background="red"/>
  </Border>
</StackPanel>

HAmbD1gITb