WPF canvas button?

I am learning WPF at the moment.

I have vector graphics that I would like to use as a background for a button, but I cannot find a way to do this in the documentation. I thought it would be obvious what to do.

Regards, Mark

+1
source share
2 answers

You can use VisualBrush:

<Button Content="Hello">
    <Button.Background>
        <VisualBrush>
            <VisualBrush.Visual>
                <!-- Your vector graphics here -->
            </VisualBrush.Visual>
        </VisualBrush>
    </Button.Background>
</Button>
+4
source

Apologies

I think I found a solution. DrawingBrush .

Thanks Mark

+3
source

Source: https://habr.com/ru/post/1754791/


All Articles