Table of Contents

Interface ICalendar

A .NET WPF calendar or a date picker object.

Inherited Members
IUiObjectBase.GetObjectProperty<TValue>(string)
IUiObjectBase.MakeVisible()
IUiObjectBase.ShowContextMenu()
IUiObjectBase.CanFocus
IUiObjectBase.ObjectName
IUiObjectBase.FullNamePath
IUiObjectBase.FullType
IUiObjectBase.AttachedText
IUiObjectBase.Text
IUiObjectBase.MouseMove(Location)
IUiObjectBase.IsFocused
IUiObjectBase.NativeClass
IUiObjectBase.WindowTitleRegExp
IUiObjectBase.Handle
IClickable.Click(MouseButton)
IClickable.Click(ClickArgs)
IDoubleClickable.DoubleClick(MouseButton)
IDoubleClickable.DoubleClick(ClickArgs)
ILocationInfoProvider.Location
ILocationInfoProvider.AbsoluteLocation
ILocationInfoProvider.Size
ISupportSendKeys.SendKeys(string, KeyModifier)
ISupportSendKeys.SendKeys(string)
ISupportDragAndDrop.DragAndDropOn(ISupportDragAndDrop)
ISupportDragAndDrop.DragAndDropOn(ISupportDragAndDrop, DragAndDropArgs)
IEnabledProvider.IsEnabled
IVisibleProvider.IsVisible
ISupportsNativeObject.NativeObject
ITestObject.GetDescription()
ITestObject.SetDescription(IDescription)
ITestObject.FindChildren<TChild>(IDescription)
ITestObject.Exists()
ITestObject.Exists(uint)
ITestObject.GetSnapshot()
ITestObject.Highlight()
ITestObject.HighlightMatches<TChild>(IDescription)
ITestObject.GetTextLocations(string)
ITestObject.GetTextLocations(string, Rectangle)
ITestObject.GetVisibleText()
ITestObject.GetVisibleText(Rectangle)
ITestObject.VerifyImageExists(Image, byte)
ITestObject.VerifyImageMatch(Image, byte, byte)
ITestObject.VerifyImageMatch(Image, ImageMaskArea, byte, byte)
ITestObject.CallFTMethod(string, params object[])
ITestObject.CallFTMethod<TResult>(string, params object[])
ITestObject.Parent
ITestObject.DisplayName
ITestObjectDescriber.Describe<TChild>(IDescription)
Namespace: HP.LFT.SDK.WPF
Assembly: HP.LFT.SDK.dll
Syntax
public interface ICalendar : IUiObjectBase, IUiObjectBase, IClickable, IDoubleClickable, ILocationInfoProvider, ISupportSendKeys, ISupportDragAndDrop, IEnabledProvider, IVisibleProvider, ISupportsNativeObject, ITestObject, ITestObjectDescriber

Properties

Date

Either the date or the start date of the date range associated with this object. Note:

Declaration
DateTime Date { get; }
Property Value
Type Description
DateTime
Remarks
  • In case a date range is selected, the Date property will return the start date of the range.

- If you try to retrieve a date value from a WPF calendar object (e.g. calendar.Date; calendar.Date.Month; calendar.Date.Year) before performing an operation on it, an exception of type: InvalidOperationException is returned. Therefore, make sure to precede the retrieve value step with a step that performs an operation on the calendar, such as using SetDate(DateTime) to set the date on the calendar to the current date.

DateRanges

The selected date range of this Month Calendar control in multi-selection mode.

Declaration
DateRange[] DateRanges { get; }
Property Value
Type Description
DateRange[]
Remarks

If a single date is selected in the calendar:

  • DateRanges returns an array with a single element.
  • Both DateRange.StartDate and DateRange.EndDate are equal to the selected date.

HelpText

The help text associated with this object.

Declaration
string HelpText { get; }
Property Value
Type Description
string

ParentText

The text associated with the parent object of this object.

Declaration
string ParentText { get; }
Property Value
Type Description
string

Methods

GetDateFormatType()

Returns the date format type.

Declaration
DateFormatType GetDateFormatType()
Returns
Type Description
DateFormatType

SetDate(DateTime)

Sets the date of a WPF calendar or of a date picker.

Declaration
void SetDate(DateTime date)
Parameters
Type Name Description
DateTime date

The date to set.

SetDateRange(DateRange)

Sets the date range of a WPF calendar or the date of a date picker.

Declaration
void SetDateRange(DateRange dateRange)
Parameters
Type Name Description
DateRange dateRange

The date range to set.

SetDateRange(DateTime, DateTime)

Sets the date range of a WPF calendar or the date of a date picker.

Declaration
void SetDateRange(DateTime startDate, DateTime endDate)
Parameters
Type Name Description
DateTime startDate

The start date of the range.

DateTime endDate

The end date of the range.

SetDateRanges(params DateRange[])

Sets the date ranges of a WPF calendar or the date of a date picker.

Declaration
void SetDateRanges(params DateRange[] dateRanges)
Parameters
Type Name Description
DateRange[] dateRanges

The date ranges to set.

SetMonth(int)

Sets the month in a WPF calendar.

Declaration
void SetMonth(int month)
Parameters
Type Name Description
int month

A number from 1 to 12.

SetYear(int)

Sets the year in a WPF calendar.

Declaration
void SetYear(int year)
Parameters
Type Name Description
int year

The year to be set for the calendar.

Extension Methods

TestObjectExtensions.WaitUntilEnabled<T>(T)
TestObjectExtensions.WaitUntilEnabled<T>(T, int)
TestObjectExtensions.WaitUntilExists<T>(T)
TestObjectExtensions.WaitUntilExists<T>(T, int)
TestObjectExtensions.WaitUntilVisible<T>(T)
TestObjectExtensions.WaitUntilVisible<T>(T, int)
TestObjectExtensions.WaitUntil<T>(T, Func<T, bool>)
TestObjectExtensions.WaitUntil<T>(T, Func<T, bool>, int)