WPF Checked ListBox

Hi There,

I've spent over 2.5 hours trying to figure out how to do this stupid, mundane thing that should be really easy...  and I'm kind of frustrated!  I need to move on with my project, instead of trying to figure out how to make this dumb thing work...

I'm basically trying to figure out how to create a checked listbox in WPF similar to ASP.NET"s "CheckListBox" control with Repeat columns set to "2" and RepeatDirection of "Verticle".  

I'm trying to bind a List<T> to it.

I think it would be similar to this post here, but they didn't provide any implementation examples:
http://alexshed.spaces.live.com/?_c11_BlogPart_BlogPart=blogview&_c=BlogPart&partqs=cat%3DWPF

I would really appreciate your help.  Thanks!
LVL 27
VBRocksAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

SriVaddadiCommented:
0
VBRocksAuthor Commented:
Hey thanks, SriVaddadi.  I saw that earlier.  It's huge...
0
SriVaddadiCommented:
You mean it would nt help you?
0
VBRocksAuthor Commented:
No, no... it's just a lot to read.  I'm working on a project, and have to have it done tonight, so I don't have the time to read it.  But I actually just discovered a MUCH easier way.  I'll give you some points for helping through.  Thanks!

Here's the easier way:

<ListBox Height="50" Width="175" HorizontalAlignment="Left"
                 Grid.Row="4" Grid.ColumnSpan="2" Margin="4"
                 x:Name="lstSupervisors" >
           
    <ListBox.ItemTemplate>
        <DataTemplate>
            <StackPanel Orientation="Horizontal">
                <CheckBox IsChecked="{Binding Path=IsSupervisor}" />
                <TextBlock Text="{Binding Path=FullName}" />
            </StackPanel>
        </DataTemplate>
    </ListBox.ItemTemplate>

</ListBox>

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
SriVaddadiCommented:
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Development

From novice to tech pro — start learning today.