Class MonthCalendarControl
Represents a Windows control that enables the user to select a date using a visual monthly calendar display. Wraps the System.Windows.Forms.MonthCalendar control.
Inheritance
Inherited Members
Namespace: FastReport.Dialog
Assembly: FastReport.dll
Syntax
public class MonthCalendarControl : DataFilterBaseControl, IComponent, IDisposable, IFRSerializable, IHasEditor
Constructors
MonthCalendarControl()
Initializes a new instance of the MonthCalendarControl class with default settings.
Declaration
public MonthCalendarControl()
Properties
AnnuallyBoldedDates
Gets or sets the array of DateTime objects that determines which annual days are displayed in bold. Wraps the System.Windows.Forms.MonthCalendar.AnnuallyBoldedDates property.
Declaration
[Browsable(false)]
public DateTime[] AnnuallyBoldedDates { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime[] |
BoldedDates
Gets or sets the array of DateTime objects that determines which nonrecurring dates are displayed in bold. Wraps the System.Windows.Forms.MonthCalendar.BoldedDates property.
Declaration
[Browsable(false)]
public DateTime[] BoldedDates { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime[] |
CalendarDimensions
Gets or sets the number of columns and rows of months displayed. Wraps the System.Windows.Forms.MonthCalendar.CalendarDimensions property.
Declaration
public Size CalendarDimensions { get; set; }
Property Value
Type | Description |
---|---|
System.Drawing.Size |
DateChangedEvent
Gets or sets a script method name that will be used to handle the DateChanged event.
Declaration
public string DateChangedEvent { get; set; }
Property Value
Type | Description |
---|---|
System.String |
FirstDayOfWeek
Gets or sets the first day of the week as displayed in the month calendar. Wraps the System.Windows.Forms.MonthCalendar.FirstDayOfWeek property.
Declaration
public Day FirstDayOfWeek { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Forms.Day |
MaxDate
Gets or sets the maximum allowable date. Wraps the System.Windows.Forms.MonthCalendar.MaxDate property.
Declaration
public DateTime MaxDate { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime |
MaxSelectionCount
Gets or sets the maximum number of days that can be selected in a month calendar control. Wraps the System.Windows.Forms.MonthCalendar.MaxSelectionCount property.
Declaration
public int MaxSelectionCount { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
MinDate
Gets or sets the minimum allowable date. Wraps the System.Windows.Forms.MonthCalendar.MinDate property.
Declaration
public DateTime MinDate { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime |
MonthCalendar
Gets an internal MonthCalendar.
Declaration
[Browsable(false)]
public MonthCalendar MonthCalendar { get; }
Property Value
Type | Description |
---|---|
System.Windows.Forms.MonthCalendar |
MonthlyBoldedDates
Gets or sets the array of DateTime objects that determine which monthly days to bold. Wraps the System.Windows.Forms.MonthCalendar.MonthlyBoldedDates property.
Declaration
[Browsable(false)]
public DateTime[] MonthlyBoldedDates { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime[] |
SelectionEnd
Gets or sets the end date of the selected range of dates. Wraps the System.Windows.Forms.MonthCalendar.SelectionEnd property.
Declaration
[Browsable(false)]
public DateTime SelectionEnd { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime |
SelectionRange
Gets or sets the selected range of dates for a month calendar control. Wraps the System.Windows.Forms.MonthCalendar.SelectionRange property.
Declaration
[Browsable(false)]
public SelectionRange SelectionRange { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Forms.SelectionRange |
SelectionStart
Gets or sets the start date of the selected range of dates. Wraps the System.Windows.Forms.MonthCalendar.SelectionStart property.
Declaration
[Browsable(false)]
public DateTime SelectionStart { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime |
ShowToday
Gets or sets a value indicating whether the date represented by the TodayDate property is displayed at the bottom of the control. Wraps the System.Windows.Forms.MonthCalendar.ShowToday property.
Declaration
public bool ShowToday { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
ShowTodayCircle
Gets or sets a value indicating whether today's date is circled. Wraps the System.Windows.Forms.MonthCalendar.ShowTodayCircle property.
Declaration
public bool ShowTodayCircle { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
ShowWeekNumbers
Gets or sets a value indicating whether the month calendar control displays week numbers (1-52) to the left of each row of days. Wraps the System.Windows.Forms.MonthCalendar.ShowWeekNumbers property.
Declaration
public bool ShowWeekNumbers { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
TodayDate
Gets or sets the value that is used by MonthCalendar as today's date. Wraps the System.Windows.Forms.MonthCalendar.TodayDate property.
Declaration
public DateTime TodayDate { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime |
Methods
AttachEvents()
Attaches Control events to its event handlers.
Declaration
protected override void AttachEvents()
Overrides
Remarks
Override this method if your custom control has own events.
DetachEvents()
Detaches Control events from its event handlers.
Declaration
protected override void DetachEvents()
Overrides
Remarks
Override this method if your custom control has own events. In this method, you should detach control's events that were attached in the AttachEvents() method.
GetSelectionPoints()
Gets the object's selection points.
Declaration
protected override SelectionPoint[] GetSelectionPoints()
Returns
Type | Description |
---|---|
SelectionPoint[] | Array of SelectionPoint objects. |
Overrides
Remarks
Selection point is a small square displayed at the object's sides when object is selected in the designer. You can drag this square by the mouse to change the object's size. For example, the TextObject has eight selection points to change its width and height by the mouse.
If you are developing a new component for FastReport, you may override this method if your object has non-standard set of selection points. For example, if an object has something like "AutoSize" property, it would be good to disable all selection points if that property is true, to disable resizing of the object by the mouse.
GetValue()
Returns value entered in the control.
Declaration
protected override object GetValue()
Returns
Type | Description |
---|---|
System.Object | The value of type supported by this control. |
Overrides
Remarks
This method must return a value entered by the user. For example, TextBox control must return its Text property value. If this control supports multi-selection, return selected values in an array, for example string[] array for CheckedListBox.
OnDateChanged(DateRangeEventArgs)
This method fires the DateChanged event and the script code connected to the DateChangedEvent.
Declaration
public virtual void OnDateChanged(DateRangeEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.DateRangeEventArgs | e | Event data. |
Serialize(FRWriter)
Serializes the object.
Declaration
public override void Serialize(FRWriter writer)
Parameters
Type | Name | Description |
---|---|---|
FRWriter | writer | Writer object. |
Overrides
Remarks
Do not call this method directly. You should override it if you are developing a new component for FastReport.
This method is called when the object needs to save the state. It may happen when:
- saving the report to the file or stream;
- saving the report to the designer's undo buffer;
- assigning the object to another object using the Assign(Base) or AssignAll methods;
- saving the object to the designer's clipboard;
- saving the object to the preview (when run a report).
ShouldSerializeBackColor()
Determines whether is necessary to serialize the BackColor property.
Declaration
protected override bool ShouldSerializeBackColor()
Returns
Type | Description |
---|---|
System.Boolean | true if serialization is necessary. |
Overrides
ShouldSerializeCalendarDimensions()
Declaration
protected bool ShouldSerializeCalendarDimensions()
Returns
Type | Description |
---|---|
System.Boolean |
ShouldSerializeForeColor()
Determines whether is necessary to serialize the ForeColor property.
Declaration
protected override bool ShouldSerializeForeColor()
Returns
Type | Description |
---|---|
System.Boolean | true if serialization is necessary. |
Overrides
Events
DateChanged
Occurs when the date selected in the MonthCalendar changes. Wraps the System.Windows.Forms.MonthCalendar.DateChanged event.
Declaration
public event DateRangeEventHandler DateChanged
Event Type
Type | Description |
---|---|
System.Windows.Forms.DateRangeEventHandler |