Change shape of WPF button without changing other styles

后端 未结 3 1743
耶瑟儿~
耶瑟儿~ 2021-01-04 23:56

I would like to change the shape of a WPF button from the default round rectangle to another shape (say, an arrow), but I want to keep the rest of the styling -- fill color,

3条回答
  •  -上瘾入骨i
    2021-01-05 00:38

    You should be able to subclass the normal button control. You can then customize the subclassed button with a custom shape, but all other properties would be inherited. This would allow you to change the shape for your button and nothing else.

    Here's a good resource for creating a custom button if you have Blend:
    http://msdn.microsoft.com/en-us/library/bb613598.aspx

提交回复
热议问题