1
我的代码列表框显示字符串垂直
Add("STRING");
public void Add(string menu)
{
DataContext = menu.ToString();
}
列表框
的XAML代码<ListBox x:Name="menubox" ItemsSource='{Binding}' Margin="0,5,0,0" Height="244" Width="240" Background="Silver" BorderThickness="0" >
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Foreground="Blue" FontWeight="Bold" Text="{Binding}"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
但打印像 小号 Ť ř 我 Ñ ģ vertically.Each信作为一个项目。 如何打印它作为燎字符串谎言“STRING”
当我使用它时,它显示错误,因为缺少组件。 什么是包含此列表的程序集() – Anu 2010-03-17 04:00:34
您可以使用System.Collections.Generic作为列表,即列表 –
Queso
2010-03-17 11:49:53