Silverlight listbox一行显示多个item
ListBox 默认为一行显示一个Item
怎样设置 一行可显示多个,而且是可控的 (设置一行显示几个Itme)
请教高手
在线等待 谢谢
你的要求蛮新奇古怪的啊。类似这样的功能,不是非得要ListBox的吧?换个容器换个方式行不行?
一定要这样?改样式看看(比较笨欧):
<ListBox Height="111" Margin="12,24,0,0" Name="listBox1" Width="134" HorizontalAlignment="Left" VerticalAlignment="Top" Opacity="1" SelectionChanged="listBox1_SelectionChanged">
<ListBoxItem Content="张三" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0" Height="18" Padding="0" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Name="lbxItem01" />
<ListBoxItem Content="李四" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="25,-18,0,0" Height="18" Padding="0" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Name="lbxItem02" />
<ListBoxItem Content="王五" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="50,-18,0,0" Height="18" Padding="0" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Name="lbxItem03" />
</ListBox>
另外,模板是咋回事,能行吗?要不你试试。我没玩过。