Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

Commented Issue: CheckComboBox: Display bug [19361]

$
0
0
Hi,

using the checkcombobox, there is a display bug when the classic windows theme is used. Even if checked, the selected item(s) will be displayed as being unchecked.

See screenshot included as attachment:

Hope this annoying bug will be fixed. Otherwise thank you for this control.
Comments: ** Comment from web user: danrossiter **

This is still present in 2.2. We're using a MVVM pattern and the following code snippets are being used. In combination, they result in the control being rendered with the header populated with the text from the selected item(s) in SelectedRegions, but the checkbox not being set. Manually checking the box by the item(s) in SelectedRegions double populates the header, as seen in the attached screen shot.

XAML:
```
<xctk:CheckComboBox
Grid.Row="0"
Grid.Column="0"
Text="Region"
ItemsSource="{Binding Path=Regions}"
DisplayMemberPath="id"
SelectedItemsOverride="{Binding Path=SelectedRegions, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
```

ViewModel:
```
public ObservableCollection<idClass> Regions
{
get
{
return regions;
}

set
{
if (!Equals(regions, value))
{
regions = value;
NotifyPropertyChanged("Regions");
}
}
}

public ObservableCollection<idClass> SelectedRegions
{
get
{
return selectedRegions;
}

set
{
if (!Equals(selectedRegions, value))
{
selectedRegions = value;
NotifyPropertyChanged("SelectedRegions");
}
}
}
```

XAML.CS:
```
public IEnumerable<idClass> SelectedRegions
{
set
{
Instance.ViewModel.SelectedRegions.Clear();
if (value != null)
{
value.ForEach(Instance.ViewModel.SelectedRegions.Add);
}
}
}
```


Viewing all articles
Browse latest Browse all 4964

Trending Articles



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