Apply style for buttons in all Windows in WPF

后端 未结 4 627
温柔的废话
温柔的废话 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:24

    You could use the application resources to do that.

    Here's a bit of code for example (in app.xaml)

    
      
    
    

    and then, for your buttons (for example):

    Hope this will help you to find what you're looking for.

提交回复
热议问题