0

i`m looking for quite some time through the WWW with out Success

my Debug Output get flooded with


    System.Windows.Data Error: 25 : ItemTemplate and ItemTemplateSelector are not valid for item Type='CheckBox'

XAML:

<ScrollViewer CanContentScroll="True" HorizontalScrollBarVisibility="Visible" VerticalScrollBarVisibility="Disabled">
            <ItemsControl ItemsSource="{Binding WrapPanel}">
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <CheckBox  IsChecked="{Binding IsChecked}" ToolTip="{Binding ToolTip}" Margin="3,0,0,0">
                            <TextBlock Text="{Binding Content}" TextWrapping="Wrap" Width="250"></TextBlock>
                        </CheckBox>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <WrapPanel Orientation="Vertical" Height="735" Margin="0,10,0,0" ScrollViewer.VerticalScrollBarVisibility="Visible" ItemWidth="290" ItemHeight="20">

                        </WrapPanel>
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>
            </ItemsControl>
        </ScrollViewer>

The final results still works like intended but that Spam in the Debug Output is kind of annoying hope you can help

EDIT: I have to use .Net 3.5. Sadly i cant change to a more recent Version. And renaming the Bound Collection didn´t helped.

Deagle
  • 1
  • 1

0 Answers0