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.
コードのどこかで a の幅を 0 に設定する必要があり、別の場所では、 を使用するときに xaml が行っていることを再発明するのではなく、xaml と同じようにGridViewColumn設定したいと考えています。"Auto""Auto"
GridViewColumn
"Auto"
コードでこれを行う方法についてのアイデアはありますか?
ここで答えを見つけました。
col.Width = Double.NaN;
これは実際にはデフォルト値であるため、幅を設定しない場合、列はデフォルトで自動サイズ変更されます。