Mer*_*rmi 5 silverlight wpf stackpanel windows-8
我需要RadChart在水平方向内有两个s,StackPanel并希望两个图表的宽度相等.我不想给图表的宽度明确的长度.这可以通过使用Grid控件轻松实现,但我的场景需要a StackPanel.
rab*_*ens 14
通常,文档不能快速理解,因为它要么以令人困惑的方式书写,要么所需的信息隐藏在大量其他信息中,而这些信息对特定情况没有帮助.所以,在我看来,即使它是一个"基本的东西",给出一个快速回答也没有坏处(或者如果一个人认为它太原始,他/她应该只发布任何东西).
<StackPanel Orientation="Horizontal" Grid.IsSharedSizeScope="True">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition SharedSizeGroup="MySizeGroup" />
</Grid.ColumnDefinitions>
<Button Height="23" Content="Reset" Padding="5,1" />
</Grid>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition SharedSizeGroup="MySizeGroup" />
</Grid.ColumnDefinitions>
<Button Height="23" Content="Set" Padding="5,1" />
</Grid>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition SharedSizeGroup="MySizeGroup" />
</Grid.ColumnDefinitions>
<Button Height="23" Content="Import" Padding="5,1" />
</Grid>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition SharedSizeGroup="MySizeGroup" />
</Grid.ColumnDefinitions>
<Button Height="23" Content="Export" Padding="5,1" />
</Grid>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition SharedSizeGroup="MySizeGroup" />
</Grid.ColumnDefinitions>
<Button Height="23" Content="Create new" Padding="5,1" />
</Grid>
</StackPanel>
Run Code Online (Sandbox Code Playgroud)
希望这可以帮助 :)
把它们放到individual中Grids,使用一个带有common的列SharedSizeGroup并设置Grid.IsSharedSizeScope为trueon StackPanel。
| 归档时间: |
|
| 查看次数: |
4024 次 |
| 最近记录: |