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