Completed
Last Updated: 09 Mar 2022 15:55 by ADMIN
Release LIB 2022.1.314 (14 March 2022)
Martin Ivanov
Created on: 02 Mar 2022 11:12
Category: ColorPicker
Type: Bug Report
0
ColorPicker: NullReferenceException is thrown when the IsDropDownOpen property is set to True initially

A NullReferenceException is thrown when the drop down part of the ColorPicker control is opened initially. For example, this can happen if the IsDropDownOpen property is set to True in XAML. 

This bug is actually related to the RadSplitButton used inside the ControlTemplate of the ColorPicker. It is reproducible also if you use RadSplitButton only. 

The issue reproduces with the Office2016 and Office2019 themes, but probably appears also in other themes (Green and later). The error is gone if you use an older theme like the default Office_Black.

To work this around, set the IsDropDownOpen property of the RadColorPicker in its Loaded event handler.

private void RadColorPicker_Loaded(object sender, RoutedEventArgs e)
{
	var picker = (RadColorPicker)sender;
	picker.IsDropDownOpen = true;
}

 

0 comments