[]
Represents a control which provides you more powerful editing and display capability for DateTime type value.
[StyleTypedProperty(Property = "DropDownButtonStyle", StyleTargetType = typeof(DropDownButton))]
[StyleTypedProperty(Property = "DropDownCalendarStyle", StyleTargetType = typeof(GcDropDownCalendar))]
[StyleTypedProperty(Property = "DropDownWindowStyle", StyleTargetType = typeof(DropDownWindow))]
[StyleTypedProperty(Property = "SpinButtonStyle", StyleTargetType = typeof(SpinButton))]
[TemplatePart(Name = "PART_Popup", Type = typeof(DropDownWindow))]
[TemplatePart(Name = "PART_DropDownChild", Type = typeof(FrameworkElement))]
[TemplateVisualState(Name = "ActiveDropDown", GroupName = "ActiveStates")]
[TemplateVisualState(GroupName = "SpinButtonStates", Name = "SpinButtonCollapsed")]
[TemplateVisualState(GroupName = "SpinButtonStates", Name = "SpinButtonVisible")]
[TemplateVisualState(GroupName = "DropDownButtonStates", Name = "DropDownButtonCollapsed")]
[TemplateVisualState(GroupName = "DropDownButtonStates", Name = "DropDownButtonVisible")]
[TemplateVisualState(Name = "InsertState", GroupName = "EditModeStates")]
[TemplateVisualState(Name = "OverwriteState", GroupName = "EditModeStates")]
public class GcDateTime : FieldsEditorControl, IAnimatable, IFrameworkInputElement, IInputElement, IQueryAmbient, IAddChild, ISupportInitialize
<StyleTypedProperty(Property:="DropDownButtonStyle", StyleTargetType:=GetType(DropDownButton))>
<StyleTypedProperty(Property:="DropDownCalendarStyle", StyleTargetType:=GetType(GcDropDownCalendar))>
<StyleTypedProperty(Property:="DropDownWindowStyle", StyleTargetType:=GetType(DropDownWindow))>
<StyleTypedProperty(Property:="SpinButtonStyle", StyleTargetType:=GetType(SpinButton))>
<TemplatePart(Name:="PART_Popup", Type:=GetType(DropDownWindow))>
<TemplatePart(Name:="PART_DropDownChild", Type:=GetType(FrameworkElement))>
<TemplateVisualState(Name:="ActiveDropDown", GroupName:="ActiveStates")>
<TemplateVisualState(GroupName:="SpinButtonStates", Name:="SpinButtonCollapsed")>
<TemplateVisualState(GroupName:="SpinButtonStates", Name:="SpinButtonVisible")>
<TemplateVisualState(GroupName:="DropDownButtonStates", Name:="DropDownButtonCollapsed")>
<TemplateVisualState(GroupName:="DropDownButtonStates", Name:="DropDownButtonVisible")>
<TemplateVisualState(Name:="InsertState", GroupName:="EditModeStates")>
<TemplateVisualState(Name:="OverwriteState", GroupName:="EditModeStates")>
Public Class GcDateTime
Inherits FieldsEditorControl
Implements IAnimatable, IFrameworkInputElement, IInputElement, IQueryAmbient, IAddChild, ISupportInitialize
The GcDateTime control allows you to design a functional date-time input interface quickly and efficiently.
Users can type a date time directly into a text field, which sets the Text and Value property. Also user can select a date from dropdown calendar and it will be set to Text and Value property. When user change the Fields in GcDateTime's FieldSet, it will represent different display text to the same value.
Users can change the display format to represent different content from fields when control lost keyboard focus. It will affect GcDateTime's DisplayText property.
Users can select a DateTime from dropdown calendar. The dropdown calendar can also be set through DropDownCalendarStyle.
Supported VisualState list:
VisualStateGroup Name |
VisualState Name |
Description |
---|---|---|
CommonStates |
Normal |
Represents the visual appearance when control is in normal state. |
CommonStates |
Disabled |
|
CommonStates |
ReadOnly |
Represents the visual appearance when IsReadOnly is true. | l
CommonStates |
MouseOver |
Represents the visual appearance when IsMouseOver is true. |
ActiveStates |
ActiveDropDown |
Represents the visual appearance when IsActive and IsDropDownOpen is true. |
ActiveStates |
Active |
|
ActiveStates |
Inactive |
|
InputStates |
Full |
|
InputStates |
Completed |
Represents the visual appearance when IsCompleted is true. |
InputStates |
Empty |
|
InputStates |
Part |
Represents the visual appearance when IsFull, IsCompleted and IsEmpty all are false. |
ValidationStates |
Valid |
Represents the visual appearance when System.Windows.Controls.Validation.GetHasError(System.Windows.DependencyObject) returns false. |
ValidationStates |
InvalidFocused |
Represents the visual appearance when System.Windows.Controls.Validation.GetHasError(System.Windows.DependencyObject) returns true and control has focus. |
ValidationStates |
InvalidUnfocused |
Represents the visual appearance when System.Windows.Controls.Validation.GetHasError(System.Windows.DependencyObject) returns true and control has no focus. |
Name | Description |
---|---|
GcDateTime() | Initializes a new instance of the GrapeCity.Windows.InputMan.GcDateTime class. |
Name | Description |
---|---|
AllowDropDownOpenProperty | Identifies the AllowDropDownOpen dependency property. |
AutoOpenDropDownProperty | Identifies the AutoOpenDropDown dependency property. |
ControlValidatorSetProperty | Identifies the GrapeCity.Windows.InputMan.GcDateTime.ControlValidatorSet dependency property. |
DefaultActiveFieldIndexProperty | Identifies the GrapeCity.Windows.InputMan.GcDateTime.DefaultActiveFieldIndex dependency property. |
DisplayFieldSetProperty | Identifies the GrapeCity.Windows.InputMan.GcDateTime.DisplayFieldSet dependency property. |
DropDownButtonStyleProperty | Indicates the GrapeCity.Windows.InputMan.GcDateTime.DropDownButtonStyle DependencyProperty. |
DropDownButtonVisibilityProperty | Identifies the GrapeCity.Windows.InputMan.GcDateTime.DropDownButtonVisibility dependency property. |
DropDownCalendarStyleProperty | Identifies the DropDownCalendarStyle dependency property. |
DropDownWindowStyleProperty | Identifies the DropDownWindowStyle DependencyProperty |
ExitOnLastCharProperty | Identifies the GrapeCity.Windows.InputMan.GcDateTime.ExitOnLastChar dependency property. |
FieldSetProperty | Identifies the GrapeCity.Windows.InputMan.GcDateTime.FieldSet dependency property. |
FieldsEditModeProperty | Identifies the GrapeCity.Windows.InputMan.GcDateTime.FieldsEditMode dependency property. |
FirstDayOfWeekProperty | Identifies the FirstDayOfWeek dependency property. |
FocusedDateProperty | Identifies the FocusedDate dependency property. |
HighlightTextProperty | Identifies the GrapeCity.Windows.InputMan.GcDateTime.HighlightText dependency property. |
IsDropDownOpenProperty | Identifies the IsDropDownOpen dependency property. |
IsInvalidTextProperty | Identifies the GrapeCity.Windows.InputMan.GcDateTime.IsInvalidText dependency property. |
IsTodayHighlightedProperty | Identifies the IsTodayHighlighted dependency property. |
MaxDateProperty | Identifies the GrapeCity.Windows.InputMan.GcDateTime.MaxDate dependency property. |
MinDateProperty | Identifies the GrapeCity.Windows.InputMan.GcDateTime.MinDate dependency property. |
NumberChangedEvent | Identifies the GrapeCity.Windows.InputMan.GcDateTime.NumberChanged routed event. |
NumberProperty | Identifies the GrapeCity.Windows.InputMan.GcDateTime.Number dependency property. |
PromptCharProperty | Identifies the GrapeCity.Windows.InputMan.GcDateTime.PromptChar dependency property. |
RecommendedValueProperty | Identifies the GrapeCity.Windows.InputMan.GcDateTime.RecommendedValue dependency property. |
ShowLiteralsProperty | Identifies the GrapeCity.Windows.InputMan.GcDateTime.ShowLiterals dependency property. |
ShowRecommendedValueProperty | Identifies the GrapeCity.Windows.InputMan.GcDateTime.ShowRecommendedValue dependency property. |
SpinButtonStyleProperty | Identifies the SpinButtonStyle DependencyProperty. |
SpinButtonVisibilityProperty | Identifies the GrapeCity.Windows.InputMan.GcDateTime.SpinButtonVisibility DependencyProperty. |
SpinIncrementValueProperty | Identifies the GrapeCity.Windows.InputMan.GcDateTime.SpinIncrementValue dependency property. |
SpinModeProperty | Identifies the GrapeCity.Windows.InputMan.GcDateTime.SpinMode dependency property. |
TabActionProperty | Identifies the GrapeCity.Windows.InputMan.GcDateTime.TabAction dependency property. |
ValidationTriggerProperty | Identifies the GrapeCity.Windows.InputMan.GcDateTime.ValidationTrigger dependency property. |
ValueChangedEvent | Identifies the GrapeCity.Windows.InputMan.GcDateTime.ValueChanged routed event. |
ValueProperty | Identifies the GrapeCity.Windows.InputMan.GcDateTime.Value dependency property. |
WatermarkDisplayEmptyEraForegroundProperty | Identifies the GrapeCity.Windows.InputMan.GcDateTime.WatermarkDisplayEmptyEraForeground dependency property. |
WatermarkDisplayEmptyEraProperty | Identifies the GrapeCity.Windows.InputMan.GcDateTime.WatermarkDisplayEmptyEra dependency property. |
WatermarkEmptyEraForegroundProperty | Identifies the GrapeCity.Windows.InputMan.GcDateTime.WatermarkEmptyEraForeground dependency property. |
WatermarkEmptyEraProperty | Identifies the GrapeCity.Windows.InputMan.GcDateTime.WatermarkEmptyEra dependency property. |
Name | Description |
---|---|
ActiveField | Gets the current active field of the control. |
AllowDropDownOpen | Gets or sets a value indicating whether allow to open drop down. This is a dependency property. |
ApplyRecommendedValueCommand | Represents the ApplyRecommendedValueCommand command, which requests that recommended value be applied. |
AutoOpenDropDown | Gets or sets a bool value indicates the drop-down window auto shown when GcDateTime gets focus. This is a dependency property. |
BlackoutDates | Gets a collection of dates that are marked as not selectable in the drop down calendar. |
ControlValidatorSet | Gets or sets the a GrapeCity.Windows.InputMan.ControlValidatorSet which indicates a collection of GrapeCity.Windows.InputMan.ControlValidator. |
DefaultActiveFieldIndex | Gets or sets the index of default active editable field. This is a dependency property. |
DisplayFieldSet | Gets or sets the GrapeCity.Windows.InputMan.Fields.DateDisplayFieldSet of the GcDateTime control. |
DropDownButtonStyle | Gets or sets a style which is used to render the dropdown button. |
DropDownButtonVisibility | Gets or sets the GrapeCity.Windows.InputMan.ButtonVisibility of the dropdown side button. This is a dependency property. |
DropDownCalendarStyle | Gets or sets a Style which is used to render the drop down calendar. This is a dependency property. |
DropDownWindowStyle | Gets or sets the Style for the GrapeCity.Windows.InputMan.Primitives.DropDownWindow. This is a dependency property. |
ExitOnLastChar | Gets or sets whether or not the next control in the tab order receives the focus as soon as the control is filled at the last character. |
FieldSet | Gets or sets the a GrapeCity.Windows.InputMan.Fields.DateFieldSet which indicate a field collection of GcDateTime. |
FieldsEditMode | Gets or sets the fields edit mode of GcDateTime. |
FirstDayOfWeek | Gets or sets the day that is considered the beginning of the week in the drop down calendar. This is a dependency property. |
FocusedDate | Gets or sets the day with focus in the drop down calendar. This is a dependency property. |
HighlightText | Gets or sets how to select the text when the control receives the focus. |
IsDropDownOpen | Gets or sets a value that indicates whether the drop-down for a GcDateTime is currently open. This is a dependency property. |
IsInvalidText | Gets a bool value indicates whether the text is invalid. |
IsTodayHighlighted | Gets or sets a value that indicates whether the current date is highlighted. This is a dependency property. |
MaxDate | Gets or sets the maximum possible value of the range element. |
MinDate | Gets or sets the minimum possible value of the range element. |
Number | Gets or sets the underlying value in long integer format. |
PromptChar | Gets or sets the character used as a prompt for input. |
RecommendedValue | Gets or sets a value which is recommended to input. |
SetNowCommand | Represents the SetNowCommand command, which requests that GcDateTime will be set to DateTime.Now. |
ShowLiterals | Gets or sets how to display the literals. |
ShowRecommendedValue | Gets or sets a value indicating whether show the RecommendedValue. |
SpinButtonStyle | Gets or sets a Style which used to render GrapeCity.Windows.InputMan.Primitives.SpinButton. This is a dependency property. |
SpinButtonVisibility | Gets or sets the GrapeCity.Windows.InputMan.ButtonVisibility of the spin side button. This is a dependency property. |
SpinIncrementValue | Gets or sets the spin increment value. |
SpinMode | Gets or sets the mode indicates how to spin the GcDateTime. |
SwitchDropDownCommand | Represents the SwitchDropDownCommand command, which switched the drop down window between open and closed. |
TabAction | Gets or sets a value to determine whether the tab key moves the focus between controls or between fields within the control. |
ValidationTrigger | Gets or sets a value that determines the timing of validating GrapeCity.Windows.InputMan.GcDateTime.Value property. |
Value | Gets or sets the value assigned to the GrapeCity.Windows.InputMan.GcDateTime control. |
WatermarkDisplayEmptyEra | Gets or sets the display empty era watermark which is shown when GcDateTime has no focus, and its value can't show as era year. |
WatermarkDisplayEmptyEraForeground | Gets or sets foreground which indicates the drawing brush to draw the WatermarkDisplayEmptyEra. |
WatermarkEmptyEra | Gets or sets the empty era watermark which is shown when the GcDateTime has focus, and its value can't show as era year. |
WatermarkEmptyEraForeground | Gets or sets foreground which indicates the drawing brush to draw the WatermarkEmptyEra. |
Name | Description |
---|---|
DoSpinDown(TimeSpan) | Perform spin down by the given TimeSpan. |
DoSpinUp(TimeSpan) | Perform spin up by the given TimeSpan. |
OnDropDownClosed(EventArgs) | Raises the DropDownClosed event. |
OnDropDownOpened(EventArgs) | Raises the DropDownOpened event. |
OnIsActiveChanged(RoutedEventArgs) | Invoked when IsActive property changed. |
OnNumberChanged(RoutedEventArgs) | Invoked when GrapeCity.Windows.InputMan.GcDateTime.Number property is changed. |
OnPropertyChanged(DependencyPropertyChangedEventArgs) | Invoked whenever the effective value of any dependency property on this FrameworkElement has been updated. The specific dependency property that changed is reported in the arguments parameter. Overrides System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs). |
OnValueChanged(RoutedEventArgs) | Invoked when Value property is changed. |
OpenDropDown() | Open drop down window of control. |
Name | Description |
---|---|
DropDownClosed | Occurs when the GrapeCity.Windows.InputMan.Primitives.DropDownWindow of a GcDateTime is closed. |
DropDownOpened | Occurs when the GrapeCity.Windows.InputMan.Primitives.DropDownWindow of a GcDateTime is opened. |
NumberChanged | Occurs when GrapeCity.Windows.InputMan.GcDateTime.Number property is changed. |
ValueChanged | Occurs when Value property is changed. |