How to change the color of the icon inside a Rectangle - WPF

1

I need to change the color of the button icon to "White", but I do not know how to do it. I'm using a Mahapss Icon Pack ... I've already seen doing this on the net using the ContentControl from GRID, but being inside a rectangle, I have no idea ... Does anyone know how to do this?

<ButtonWidth="148" Height="48" Margin="0 0 10 0" Style="{StaticResource susButton}">
    <Button.Content>
        <StackPanel Orientation="Horizontal">


            <Rectangle Width="20" Height="20" Margin="0 0 7 0">
                <Rectangle.Fill>
                    <VisualBrush Visual="{StaticResource appbar_add}" Stretch="None" />
                </Rectangle.Fill>

            </Rectangle>

            <TextBlock Text="Novo Cadastro">

            </TextBlock>
        </StackPanel>
    </Button.Content>
</Button>
    
asked by anonymous 04.01.2018 / 14:02

1 answer

1

According to the library reference, this would be the solution:

<Rectangle Width="20" Height="20" Margin="0 0 7 0" Fill="White">
    <Rectangle.OpacityMask>
        <VisualBrush Visual="{StaticResource appbar_add}" Stretch="Fill" />
    </Rectangle.OpacityMask>
</Rectangle>

Font

    
04.01.2018 / 20:59