DatePicker and PropertyValueEditor Error

Mar 5, 2009 at 11:24 AM

Hi! I am trying to implement a custom editor for dates to use it in a propertygrid.
My DatePickerEditor worked fine until I tried to set the IsEnabled state through binding:

<TK:DatePicker x:Name="PART_editor"
                       SelectedDate="{Binding Value, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                       IsEnabled="{Binding IsEditable}" />

Did that for a custom string editor as well and there it worked without problems. But for the Datepicker I am getting an exeption I don't really understand:
The Name "PART_DisabledVisual" could not be found in namespace "System.Windows.Controls.Grid".
Why is he trying to use grid there?