This project has moved. For the latest updates, please go here.
2
Vote

DateTimePicker crash

description

A first chance exception of type 'System.Windows.Markup.XamlParseException' occurred in PresentationFramework.dll

Additional information: 'Set property 'Xceed.Wpf.Toolkit.Primitives.UpDownBase(System.Nullable(System.DateTime)).Value' threw an exception.' Line number '68' and line position '37'.

Attemping to use DateTimePicker, or any of the DateTime* causes it to crash.

Any form for parameters cause the same to happen.

Tried install the Toolkit Plus edition, and then i did not get the error.

comments

Silverdream wrote Aug 6, 2015 at 8:10 AM

Can note i use Visual Studio 2013, Windows 10

Extended WPF Toolkit v.2.5

BoucherS wrote Aug 6, 2015 at 12:04 PM

Hi,

Can you attach a complete sample with the problem ? I cannot reproduce with Toolkit v2.5 Community edition.

Silverdream wrote Aug 7, 2015 at 6:00 AM

BoucherS wrote Aug 7, 2015 at 2:38 PM

Hi,

Under VS2012, the sample is compiling and running correctly. The only thing I see is the XAML designer displaying an error : "The DateTimePicker does not exists in the namespace...". Is this your bug?

What do you mean by "Any form for parameters cause the same to happen.".

Spuriga wrote Jun 28 at 2:16 PM

I have the same problem with xctk 3.0.0, Visual Studio 2015 and Windows 8.1, and .NET 4.5.1.

If Format="Custom" the exception appears, if anything else, it is ok.
<xctk:DateTimePicker Value="{Binding FilterFromDate}"
Format="Custom"
FormatString="yyyy.MM.dd HH:mm"
ShowButtonSpinner="False"
Margin="0,5,0,0" 
HorizontalAlignment="Center"/>
and set the "FilterFromDate" bound property from code behind in the model constructor.

In the model:
public DateTime? FilterFromDate
{
     get { return this._filterFromDate; }
     set
     {
         this._filterFromDate = value;
         this.NotifyPropertyChanged();
     }
}
Constructor:
this.FilterFromDate = new DateTime?(DateTime.Now.AddHours(-12));

wrote Jun 28 at 2:18 PM