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

Created Unassigned: ColorPicker control RecentColors bug [21628]

$
0
0
RecentColors collection on ColorPicker control cannot be bound to in version 2.3.0

It is a simple dependency property default value issue.

Solution:


```
line 211 public static readonly DependencyProperty RecentColorsProperty = DependencyProperty.Register( "RecentColors", typeof( ObservableCollection<ColorItem> ), typeof( ColorPicker ), new UIPropertyMetadata( null ) );
```

should be

```
line 211 public static readonly DependencyProperty RecentColorsProperty = DependencyProperty.Register( "RecentColors", typeof( ObservableCollection<ColorItem> ), typeof( ColorPicker ), new UIPropertyMetadata( new ObservableCollection<ColorItem>() ) );
```

and remove line 452:
```
RecentColors = new ObservableCollection<ColorItem>();
```

Viewing all articles
Browse latest Browse all 4964

Trending Articles



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