Reusable Custom Content for Buttons

后端 未结 3 1625
无人及你
无人及你 2021-01-15 23:32

My user interface makes use of customized Buttons: They contain both an Image and a Label.

I customized a single Button

3条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-15 23:38

    I would say Control template editing as the easiest option to do this. Try using the below control template for all your buttons.I assumed the Button.Content is always the Label and Button.Tag always the Image Source

         
            
                
                
            
        
    

    And all of your button XAML will be as below

提交回复
热议问题