diff --git a/src/Avalonia.Controls/Calendar/CalendarDatePicker.cs b/src/Avalonia.Controls/Calendar/CalendarDatePicker.cs
index 775880f117..ddff1908c1 100644
--- a/src/Avalonia.Controls/Calendar/CalendarDatePicker.cs
+++ b/src/Avalonia.Controls/Calendar/CalendarDatePicker.cs
@@ -12,87 +12,9 @@ using Avalonia.Controls.Primitives;
using Avalonia.Data;
using Avalonia.Input;
using Avalonia.Interactivity;
-using Avalonia.Layout;
namespace Avalonia.Controls
{
- ///
- /// Provides data for the
- ///
- /// event.
- ///
- public class CalendarDatePickerDateValidationErrorEventArgs : EventArgs
- {
- private bool _throwException;
-
- ///
- /// Initializes a new instance of the
- ///
- /// class.
- ///
- ///
- /// The initial exception from the
- ///
- /// event.
- ///
- ///
- /// The text that caused the
- ///
- /// event.
- ///
- public CalendarDatePickerDateValidationErrorEventArgs(Exception exception, string text)
- {
- this.Text = text;
- this.Exception = exception;
- }
-
- ///
- /// Gets the initial exception associated with the
- ///
- /// event.
- ///
- ///
- /// The exception associated with the validation failure.
- ///
- public Exception Exception { get; private set; }
-
- ///
- /// Gets the text that caused the
- ///
- /// event.
- ///
- ///
- /// The text that caused the validation failure.
- ///
- public string Text { get; private set; }
-
- ///
- /// Gets or sets a value indicating whether
- ///
- /// should be thrown.
- ///
- ///
- /// True if the exception should be thrown; otherwise, false.
- ///
- ///
- /// If set to true and
- ///
- /// is null.
- ///
- public bool ThrowException
- {
- get { return this._throwException; }
- set
- {
- if (value && this.Exception == null)
- {
- throw new ArgumentException("Cannot Throw Null Exception");
- }
- this._throwException = value;
- }
- }
- }
-
///
/// Specifies date formats for a
/// .
diff --git a/src/Avalonia.Controls/Calendar/CalendarDatePickerDateValidationErrorEventArgs.cs b/src/Avalonia.Controls/Calendar/CalendarDatePickerDateValidationErrorEventArgs.cs
new file mode 100644
index 0000000000..ba7c579461
--- /dev/null
+++ b/src/Avalonia.Controls/Calendar/CalendarDatePickerDateValidationErrorEventArgs.cs
@@ -0,0 +1,82 @@
+using System;
+
+namespace Avalonia.Controls
+{
+ ///
+ /// Provides data for the
+ ///
+ /// event.
+ ///
+ public class CalendarDatePickerDateValidationErrorEventArgs : EventArgs
+ {
+ private bool _throwException;
+
+ ///
+ /// Initializes a new instance of the
+ ///
+ /// class.
+ ///
+ ///
+ /// The initial exception from the
+ ///
+ /// event.
+ ///
+ ///
+ /// The text that caused the
+ ///
+ /// event.
+ ///
+ public CalendarDatePickerDateValidationErrorEventArgs(Exception exception, string text)
+ {
+ Text = text;
+ Exception = exception;
+ }
+
+ ///
+ /// Gets the initial exception associated with the
+ ///
+ /// event.
+ ///
+ ///
+ /// The exception associated with the validation failure.
+ ///
+ public Exception Exception { get; private set; }
+
+ ///
+ /// Gets the text that caused the
+ ///
+ /// event.
+ ///
+ ///
+ /// The text that caused the validation failure.
+ ///
+ public string Text { get; private set; }
+
+ ///
+ /// Gets or sets a value indicating whether
+ ///
+ /// should be thrown.
+ ///
+ ///
+ /// True if the exception should be thrown; otherwise, false.
+ ///
+ ///
+ /// If set to true and
+ ///
+ /// is null.
+ ///
+ public bool ThrowException
+ {
+ get => _throwException;
+ set
+ {
+ if (value && Exception == null)
+ {
+ throw new ArgumentException("Cannot Throw Null Exception");
+ }
+
+ _throwException = value;
+ }
+ }
+ }
+}