-
March 16th, 2010, 02:11 AM
#1
ListBox displays text vertically
Hi,in my code i call Add() for 10 time(For loop).The listbox should display 10 different items .
But what it shows,it dispaying last item only and also vertically.Like
S
T
R
I
N
G
And each letter as one item.
My code:
public void Add(string menu)
{
DataContext = menu.ToString();
}
XAML code of Listbox:
<ListBox x:Name="menubox" ItemsSource='{Binding}' Margin="0,5,0,0" Height="244" Width="240" Background="Silver" BorderThickness="0" > </ListBox>
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|