[]
        
(Showing Draft Content)

C1.WPF.DateTimeEditors.C1DatePicker

C1DatePicker Class

Allows selecting and editing date values.

Namespace: C1.WPF.DateTimeEditors
Assembly: C1.WPF.DateTimeEditors.4.6.2.dll
Syntax
[StyleTypedProperty(Property = "CalendarStyle", StyleTargetType = typeof(Calendar))]
[TemplateVisualState(Name = "MouseOver", GroupName = "CommonStates")]
[TemplateVisualState(Name = "Disabled", GroupName = "CommonStates")]
[TemplateVisualState(Name = "Normal", GroupName = "CommonStates")]
[TemplatePart(Name = "TextBox", Type = typeof(C1TextBoxBase))]
[TemplatePart(Name = "Root", Type = typeof(FrameworkElement))]
[TemplatePart(Name = "Button", Type = typeof(Button))]
[TemplatePart(Name = "Popup", Type = typeof(Popup))]
[TemplateVisualState(Name = "Focused", GroupName = "FocusStates")]
[TemplateVisualState(Name = "Unfocused", GroupName = "FocusStates")]
[TemplateVisualState(Name = "Valid", GroupName = "ValidationStatesStates")]
[TemplateVisualState(Name = "InvalidUnfocused", GroupName = "ValidationStatesStates")]
[TemplateVisualState(Name = "InvalidFocused", GroupName = "ValidationStatesStates")]
[StyleTypedProperty(Property = "ValidationDecoratorStyle", StyleTargetType = typeof(C1ValidationDecorator))]
public class C1DatePicker : Control, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IQueryAmbient

Constructors

Name Description
C1DatePicker()

Initializes a new instance of a C1DatePicker.

Fields

Name Description
AllowNullProperty

Identifies the AllowNull dependency property.

ButtonBackgroundProperty

Identifies the ButtonBackground dependency property.

ButtonForegroundProperty

Identifies the ButtonForeground dependency property.

CalendarStyleProperty

Identifies the CalendarStyle dependency property.

CaretBrushProperty

Identifies the CaretBrush dependency property.

CornerRadiusProperty

Identifies the CornerRadius dependency property.

CustomFormatProperty

Identifies the CustomFormat dependency property.

DisabledCuesVisibilityProperty

Identifies the DisabledCuesVisibility dependency property.

DisplayDateEndProperty

Identifies the DisplayDateEnd dependency property.

DisplayDateProperty

Identifies the DisplayDate dependency property.

DisplayDateStartProperty

Identifies the DisplayDateStart dependency property.

DisplayModeProperty

Identifies the DisplayMode dependency property.

FirstDayOfWeekProperty

Identifies the FirstDayOfWeek dependency property.

FocusBrushProperty

Identifies the FocusBrush dependency property.

FocusCuesVisibilityProperty

Identifies the FocusCuesVisibility dependency property.

IsDropDownOpenProperty

Identifies the IsDropDownOpen dependency property.

IsFocusedProperty

Identifies the IsFocused dependency property.

IsReadOnlyProperty

Identifies the IsReadOnly dependency property.

IsTodayHighlightedProperty

Identifies the IsTodayHighlighted dependency property.

MaskProperty

Identifies the Mask dependency property.

MouseOverBrushProperty

Identifies the MouseOverBrush dependency property.

PressedBrushProperty

Identifies the PressedBrush dependency property.

PromptProperty

Identifies the Prompt dependency property.

SelectedDateChangedEvent

Identifies the SelectedDateChanged routed event.

SelectedDateFormatProperty

Identifies the SelectedDateFormat dependency property.

SelectedDateProperty

Identifies the SelectedDate dependency property.

SelectionBackgroundProperty

Identifies the C1.WPF.DateTimeEditors.C1DatePicker.SelectionBackground dependency property.

SelectionForegroundProperty

Identifies the C1.WPF.DateTimeEditors.C1DatePicker.SelectionForeground dependency property.

TextProperty

Identifies the Text dependency property.

ValidationDecoratorStyleProperty

Identifies the ValidationDecoratorStyle dependency property.

WatermarkProperty

Identifies the Watermark dependency property.

Properties

Name Description
AllowNull

Gets or sets whether the user can enter null values.

BlackoutDates

Gets a collection of dates that are marked as not selectable.

ButtonBackground

Gets or sets the Brush that will be assigned to the Background of the buttons inside the control.

ButtonForeground

Gets or sets the Brush that will be assigned to the Foreground of the buttons inside the control.

CalendarStyle

Gets or sets the style that is used when rendering the calendar.

CaretBrush

Gets or sets the Brush of the blinking cursor of an input control. When .NET Framework is v3.5, 'CaretBrush' takes no effect.

CornerRadius

Gets or sets a value that represents the degree to which the corners of the element are rounded.

CustomFormat

Gets or sets the custom date/time format string.

DisabledCuesVisibility

Gets or sets a value indicating whether the disabled visuals of the control are visible.

DisplayDate

Gets or sets the date to display in drop-down calendar.

DisplayDateEnd

Gets or sets the last date to be displayed.

DisplayDateStart

Gets or sets the first date to be displayed.

DisplayMode

Gets or sets a value that indicates whether the calendar displays a month, year, or decade.

FirstDayOfWeek

Gets or sets the day that is considered the beginning of the week.

FocusBrush

Gets or sets the Brush used to highlight the focused control.

FocusCuesVisibility

Gets or sets a value indicating whether the focus visuals of the control are visible.

IsDropDownOpen

Gets or sets a value indicating whether the drop-down calendar is open or closed.

IsFocused

Returns true if the control has the focus.

IsReadOnly

Gets or sets the value that determines if the C1DatePicker is read-only.

IsTodayHighlighted

Gets or sets the boolean value, specifying whether the current date is highlighted in the drop-down calendar.

Mask

Gets or sets the input mask.

MouseOverBrush

Gets or sets the Brush used to highlight the control when it has the mouse over.

PressedBrush

Gets or sets the Brush used to paint a button when it is pressed.

Prompt

Gets or sets the character used to show spaces where user is supposed to type.

SelectedDate

Gets or sets the currently selected date.

SelectedDateFormat

Gets or sets the format that is used to display the selected date.

Text

Gets or sets the text that is displayed by the C1DatePicker control.

ValidationDecoratorStyle

Gets or sets the style that is applied to the inner C1.WPF.C1ValidationDecorator.

Watermark

Gets or sets the content of the watermark.

Methods

Name Description
ChangeVisualStateCommon(bool)

Updates the current visual state of the Common visual state group to match the object's properties.

ChangeVisualStateFocus(bool)

Updates the current visual state of the Focus visual state group to match the object's properties.

FinalizeEditing()

Forces the SelectedDate property value update.

OnApplyTemplate()

Builds the visual tree for the C1DatePicker control when a new template is applied.

OnCreateAutomationPeer()

Gets an AutomationPeer object used for testing the control.

OnDateValidationError(DatePickerDateValidationErrorEventArgs)

Raises the DateValidationError event.

OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs)
OnLostFocus(RoutedEventArgs)

Finalizes editing and closes dropdown part if focus is out of the C1DatePicker control.

OnMouseWheel(MouseWheelEventArgs)

Changes the SelectedDate property according to the mouse wheel delta.

OnPropertyChanged(DependencyPropertyChangedEventArgs)

Invoked whenever the effective value of any dependency property has been updated.

OnSelectedDateChanged(SelectionChangedEventArgs)

Raises the SelectedDateChanged event.

OnSelectionCommitted()

Fires the SelectionCommitted event.

ToString()

Provides a text representation of the selected date.

Events

Name Description
CalendarClosed

Occurs when the drop-down Calendar is closed.

CalendarOpened

Occurs when the drop-down Calendar is opened.

DateValidationError

Occurs when text entered into the C1DatePicker cannot be parsed or the Date is not valid to be selected.

IsMouseOverChanged

Event raised when the IsMouseOver property has changed.

SelectedDateChanged

Occurs when the SelectedDate property is changed.

SelectionCommitted

The SelectionCommitted event is fired when the selected date is committed.