Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
最初の行からコントロールを削除してから2番目の行に追加せずに、グリッドのある行から別の行にコントロールを移動するにはどうすればよいですか?
ありがとう
実行時にこれを行いたいと仮定すると、コード ビハインドで次のことを試すことができます。
// Assuming your control is not in row 1 myControl.SetValue(Grid.RowProperty, 1)
なんで?これを簡単に行うには、その行を変更する必要があります。
別の方法は、数学を使用して、グリッド、行、およびコントロールの高さを計算し、マージンで配置することです。- 非常に厄介なコード。