当前位置: 动力学知识库 > 问答 > 编程问答 >

WPF - Change the place of a control in a grid in code-behind

问题描述:

Is it possible to change where a control is placed in a grid from code-behind?

For example, if I have a Button in Grid.Row="1", can I change that to Grid.Row="0" from code-behind?

网友答案:

Yes. Just go:

Grid.SetRow(button,0);

where button is the element to change.

分享给朋友:
您可能感兴趣的文章:
随机阅读: