Click here to Skip to main content
14,640,670 members
Rate this:
Please Sign up or sign in to vote.
See more:
I have a ListView Control, I need the checkbox add in the listView。
Posted
Rate this:
Please Sign up or sign in to vote.

Solution 4

I do not know if you have found the best solution, but think this sample will give you some help

<Window x:Class="WpfApplication1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
    <ListView>
      <ListView.View>
        <GridView>
          <GridViewColumn Width="120" Header="Date" >
            <GridViewColumn.CellTemplate>
              <DataTemplate>
                <StackPanel>
                  <CheckBox/>
                </StackPanel>
              </DataTemplate>
            </GridViewColumn.CellTemplate>
          </GridViewColumn>
          <GridViewColumn Width="120" Header="Day Of Week"  
            DisplayMemberBinding="{Binding DayOfWeek}" />
          <GridViewColumn Width="120" Header="Year" 
           DisplayMemberBinding="{Binding Year}" />
        </GridView>
      </ListView.View>
    </ListView>
  </Grid>
</Window>
   
Rate this:
Please Sign up or sign in to vote.

Solution 1

You can try these links. There are almost 96,000 results that may be able to help you.
   
Comments
Espen Harlinn 11-Jan-11 10:21am
   
5+ First result is Multiselect ListView with checkboxes in WPF
Rate this:
Please Sign up or sign in to vote.

Solution 3

I doesn't get much simpler than this:
Multiselect ListView with checkboxes in WPF[^]

Regards
Espen Harlinn
   
Rate this:
Please Sign up or sign in to vote.

Solution 2

Number 1 result from google search for "wpf listview checkbox" is this[^]. Does that help?
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100