WPF Image Command Binding

前端 未结 5 648
耶瑟儿~
耶瑟儿~ 2020-12-09 09:37

I\'m putting a WPF application together in which I have an image control which I want to bind a custom command object to from my view model that will execute when the image

5条回答
  •  余生分开走
    2020-12-09 10:09

    It can be simpler to avoid using a button and use a Hyperlink instead:

    
       
          
       
    
    

    Note that this will render the hyperlink with the default text decoration, so you'll want to add a style that removes that - putting this in the resource dictionary of the containing element will do the trick:

    
    

提交回复
热议问题