本帖最后由 lerbornjames 于 2013-10-22 16:43:09 编辑

解决方案 »

  1.   

    类似于这样即可实现了:<ComboBox.ItemTemplate>
        <DataTemplate>
            <StackPanel Orientation="Horizontal">
                <CheckBox IsChecked="{Binding IsSelected}"
                           Width="20" />
                <TextBlock Text="{Binding DayOfWeek}"
                           Width="100" />
            </StackPanel>
        </DataTemplate>
    </ComboBox.ItemTemplate>http://stackoverflow.com/questions/859227/looking-for-a-wpf-combobox-with-checkboxes/6606691#6606691
      

  2.   


    效果实现了. 我也是用这种方式的,但是少了一个StackPanel包着,所以就老报错.. 
    新手不知道这些规则.. 伤不起.. 谢谢了.. 
      

  3.   


    我现在是这样实现的:[code=csharp]<ComboBox.ItemTemplate>
        <DataTemplate>
            <StackPanel Orientation="Horizontal">
                <CheckBox Click="xxx"
                           Width="20" >
                <TextBlock>
                 <Run Text="xxx1"/>
                 <Run Text="xxx2"/>
                <TextBlock/>
                </CheckBox>
            </StackPanel>
        </DataTemplate>
    </ComboBox.ItemTemplate>
    [/code]在CheckBox的Click事件拿到的Sender监视的值为:我要怎么才能拿到 "内容" 里面的值呢..?