Displaying a list of Items in a WPF form using XAML
Posted
by Dave Colwell
on Stack Overflow
See other posts from Stack Overflow
or by Dave Colwell
Published on 2010-04-19T05:42:23Z
Indexed on
2010/04/19
6:03 UTC
Read the original article
Hit count: 352
Hi guys,
I am attempting to display a list of items (the style and controltemplate for these items are defined elsewhere) and i want to be able to add/remove as many as i want to. As i do not have infinite screen realestate I am displaying these in a ListBox control.
This is the screen i have to date:
What is going to happen is this. When i click the New button, i want the item to appear in the outlined area.
So now for the problem:
I want, when i click the New... Button, a new item to appear in the ListBox (outlined). Is it possible to do this using XAML? I am trying to work on seperating the business logic from the interface, so if there were some way to acheive this in XAML i would appreciate it. If not,can i use the custom templated item i have created in C# so that it will appear as the template specifies in the list box instead of like a normal ListBoxItem
Thanks in advance!
© Stack Overflow or respective owner