TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Danny
NA
5
5.9k
How to stretch ListboxItems in Listbox
Feb 16 2013 1:37 PM
So I have this LISTBOX, which I add items dynamically.
http://www.fileden.com/files/2007/2/5/737151/png2.jpg
As you can see it won't stretch the item to the end of the box. I want the item to stretch and therefore change in size.How can I achieve it?
This is my XAML:
<ListBox x:Name="CorrWord" Grid.Row="1" Grid.Column="4" Grid.RowSpan="3" BorderBrush="Black" BorderThickness="4" FontFamily="Agency FB" Background="{x:Null}" HorizontalContentAlignment="Stretch"/>
And this is how I add the item with C#:
CorrWord.Items.Add(String.Format("{0}\t\t{1}", word.ToUpper(), word.Length));
HorizontalContentAlignment="Stretch" does not work and I don't know what to use.
Appreciate any help!
Reply
Answers (
1
)
wpf autocompletebox control focus
what is storyboard in wpf,can you give me one sample.