How to center an element in wpf canvas

后端 未结 4 1151
谎友^
谎友^ 2020-12-14 01:18

How can I center an element in wpf canvas using attached properties?

4条回答
  •  春和景丽
    2020-12-14 02:01

    You can put the Canvas and the element you want to be centered inside a Grid :

    
        
        
    
    

提交回复
热议问题