Apply style for buttons in all Windows in WPF

后端 未结 4 636
温柔的废话
温柔的废话 2020-12-13 14:11

I have a style setup in my XAML for the creation of round corner Buttons in my WPF window. I would like this style to apply to all buttons on all windows in my

4条回答
  •  再見小時候
    2020-12-13 14:42

    The easiest way according to me is:

    1. Right click on a button in design surface

    2. Choose Edit Template->Edit a Copy

    3. Choose "Define in Application" radio button

    4. The Style will be created in App.xaml file

    5. Add that resource to every button using "style" tag

提交回复
热议问题