How to set canvas ZIndex WPF button control in Click Event?

后端 未结 3 456
醉梦人生
醉梦人生 2020-12-19 00:40

I have three buttons lying one by one. I want to show top of all button, which i click. So that I have set canvas ZIndex in XAML Code. But I want to do this in Code Behind.

3条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-19 01:02

    You can set z index in code like this-

    Panel.SetZIndex(control name, int index);
    

提交回复
热议问题