benruehl / adonis-ui

Lightweight UI toolkit for WPF applications offering classic but enhanced windows visuals
https://benruehl.github.io/adonis-ui/
MIT License
1.7k stars 143 forks source link

Ripple foreground does not work for buttons with custom content #129

Closed WilliamForsdal closed 3 years ago

WilliamForsdal commented 3 years ago

Describe the bug Let me know if this is actually a bug, or if I am just missing something.

When pressing a button with custom content, for example:

<Button>
    <StackPanel>
        <Ellipse Width="20" Height="20" Fill="Red" />
        <TextBlock Text="Text!" />
    </StackPanel>
</Button>

The text does not change color to the ripple foreground color.

To Reproduce Steps to reproduce the behavior:

  1. Create a new WPF project and add App.xaml resources like the readme
  2. Add this to the main window:
    <Window.Style>
    <Style TargetType="Window" BasedOn="{StaticResource {x:Type Window}}" />
    </Window.Style>
    <Grid>
    <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" >
        <Button Content="This button has correct foreground when pressed" />
        <Button Margin="5" HorizontalAlignment="Center">
            <StackPanel>
                <Ellipse Width="20" Height="20" Fill="Red" />
                <TextBlock Text="This does not!" />
            </StackPanel>
        </Button>
    </StackPanel>
    </Grid>
  3. press buttons

Expected behavior Pressing the buttons should change the foreground color to the correct ripple foreground.

Screenshots image image

Additional context

WilliamForsdal commented 3 years ago

Nevermind, didn't read the docs, as always 👍