Quantcast
Channel: wpftoolkit Discussions Rss Feed
Viewing all articles
Browse latest Browse all 2157

New Post: CheckComboBox doesn't bind SelectedValue when placed in a DataTemplate

$
0
0
It works exactly as advertised when standalone, but if used in a dynamically-assigned DataTemplate the SelectedValue gets ignored (in both directions).
<Window.Resources>
    <DataTemplate DataType="{x:Type wpfApplication2:Element}">
      <StackPanel>
        <TextBox Text="{Binding SelectedValues}" />
        <!-- This doesn't bind -->
        <xctk:CheckComboBox ItemsSource="{Binding AvailableValues}"
                          SelectedValue="{Binding SelectedValues}"/>
      </StackPanel>
    </DataTemplate>
  </Window.Resources>
  <StackPanel>
    <ItemsControl ItemsSource="{Binding Items}" />
    
    <TextBox Text="{Binding Item.SelectedValues}" />
    <!-- This binds OK -->
    <xctk:CheckComboBox ItemsSource="{Binding Item.AvailableValues}"
                        SelectedValue="{Binding Item.SelectedValues}" />
  </StackPanel>
Am I missing something? I can send the full sample project that demonstrates the problem.

Viewing all articles
Browse latest Browse all 2157

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>