Skip to content

Conversation

@soi013
Copy link
Contributor

@soi013 soi013 commented Apr 14, 2020

Fix #1728

Cause

This problem is come from CornerRadius.

 <Grid>
           <Border Grid.Row="0" Background="..." CornerRadius="...." />
...
           <Border Grid.Row="3"  Background="..." CornerRadius="...." />
</Grid>

Changed

So I added a Border above the Grid and move CornerRadius and Background.

<Border Background="..." CornerRadius="...." > 
    <Grid>
              <Border Grid.Row="0" />
...
              <Border Grid.Row="3" />
   </Grid>
</Border>

Preview

For explanation's sake, Brush is changed in demo (not included PR).

<UserControl x:Class="MaterialDesignColors.WpfExample.Fields"
            ...>
    <UserControl.Resources>
        <ResourceDictionary>
            ...
            <SolidColorBrush x:Key="MaterialDesignPaper" Color="Red" />
      </ResourceDictionary>
   </UserControl.Resources>
...

Before

スクリーンショット 2020-04-14 21 48 36

close up

スクリーンショット 2020-04-14 21 48 36 - コピー

After

スクリーンショット 2020-04-14 23 03 02

@Keboo Keboo merged commit c0c6d5a into MaterialDesignInXAML:master Apr 17, 2020
@Keboo Keboo added this to the 3.1.1 milestone Apr 17, 2020
@greuelpirat
Copy link
Contributor

These changes overrides the background of the current selected item

before:
image

after:
image

@soi013
Copy link
Contributor Author

soi013 commented Apr 18, 2020

omg! I will check it tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ComboBox - strange artifacts (3.1.0 release)

3 participants