How to change shaping a button in net wpf

Asked By 0 points N/A Posted on -
qa-featured

Hi everyone,

I would like to change the shape of a WPF button from the default. Make a copy of the default Button Template, and simply change the default. Please teach me on how to change shaping a button in net wpf.

Thank you so much looking forward for your answer.

SHARE
Answered By 60 points N/A #147899

How to change shaping a button in net wpf

qa-featured

Hello Donal,

Yes you can change the shape of the button without changing other attributes. In order to do that what you have to do is make a copy of your default button. Now PATH don't have content so you have to use a GRID to do the same. Here I am giving you an example:

<Grid>
    <Path />
    <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
</Grid>

where default is:

<Button>
    <ContentPresenter />
</Button>

 

Hope this will help with your question.

Thank You,

Related Questions