Visual Studio / WPF > UniformGrid > Provides a way to arrange content in a grid where all the cells in the grid have the same size.
4491 ワード
Visual Studio 2017 Community (以下VS)
Windows 7 Pro (32bit)
Silverlight 2には存在せず、WPFでのみ利用可能なPanelとして、DockPanel、UniformGrid、WrapPanelなどが存在する。
UniformGridについて調べた。
https://stackoverflow.com/questions/6197646/understanding-uniform-grid-control
Provides a way to arrange content in a grid where all the cells in the grid have the same size.
実装してみた。
MainWindow.xaml
<Window x:Class="_170530_t1500_uniformGrid.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:_170530_t1500_uniformGrid"
mc:Ignorable="d"
Title="MainWindow" Height="200" Width="525">
<Grid>
<UniformGrid Rows="3" Columns="4">
<Button Content="1" Height="40"/>
<Button Content="2" Height="40"/>
<Button Content="3" Height="40"/>
<Button Content="4" Height="40"/>
<Button Content="5" Height="40"/>
<Button Content="6" Height="40"/>
<Rectangle Fill="Aqua"/>
<Button Content="8" Height="40"/>
<Rectangle Fill="Aqua"/>
</UniformGrid>
</Grid>
</Window>
Gridを使う場合と比べて、宣言順にインスタンスが配置されていく点は便利かもしれない。
Author And Source
この問題について(Visual Studio / WPF > UniformGrid > Provides a way to arrange content in a grid where all the cells in the grid have the same size.), 我々は、より多くの情報をここで見つけました https://qiita.com/7of9/items/c0e217c30e7b21ad4514著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .