Class CalendarAutomationPeer
Exposes Calendar types to UI automation.
Inheritance
Inherited Members
Namespace: System.Windows.Automation.Peers
Assembly: OpenSilver.Controls.dll
Syntax
public class CalendarAutomationPeer : FrameworkElementAutomationPeer, IDependencyObject, IMultipleViewProvider, ISelectionProvider, ITableProvider, IGridProvider
Constructors
| Improve this Doc View SourceCalendarAutomationPeer(Calendar)
Initializes a new instance of the CalendarAutomationPeer class.
Declaration
public CalendarAutomationPeer(Calendar owner)
Parameters
Type | Name | Description |
---|---|---|
Calendar | owner | The Calendar instance to associate with the CalendarAutomationPeer. |
Methods
| Improve this Doc View SourceGetAutomationControlTypeCore()
Returns the control type for the Calendar that is associated with this CalendarAutomationPeer. This method is called by GetAutomationControlType.
Declaration
protected override AutomationControlType GetAutomationControlTypeCore()
Returns
Type | Description |
---|---|
AutomationControlType | A value of the AutomationControlType enumeration. |
Overrides
| Improve this Doc View SourceGetClassNameCore()
Returns the name of the UIElement that is associated with this FrameworkElementAutomationPeer. This method is called by GetClassName.
Declaration
protected override string GetClassNameCore()
Returns
Type | Description |
---|---|
System.String | The name of the owner type that is associated with this CalendarAutomationPeer. |
Overrides
| Improve this Doc View SourceGetNameCore()
Returns the text label of the Calendar that is associated with this CalendarAutomationPeer. This method is called by GetName.
Declaration
protected override string GetNameCore()
Returns
Type | Description |
---|---|
System.String | The text label of the element that is associated with this automation peer. |
Overrides
| Improve this Doc View SourceGetPattern(PatternInterface)
Gets the control pattern for this CalendarAutomationPeer.
Declaration
public override object GetPattern(PatternInterface patternInterface)
Parameters
Type | Name | Description |
---|---|---|
PatternInterface | patternInterface | One of the enumeration values. |
Returns
Type | Description |
---|---|
System.Object | The object that implements the pattern interface, or null if the specified pattern interface is not implemented by this peer. |
Overrides
Explicit Interface Implementations
| Improve this Doc View SourceIGridProvider.ColumnCount
Gets the total number of columns in a grid.
Declaration
int IGridProvider.ColumnCount { get; }
Returns
Type | Description |
---|---|
System.Int32 | The total number of columns in a grid. |
IGridProvider.GetItem(Int32, Int32)
Retrieves the UI automation provider for the specified cell.
Declaration
IRawElementProviderSimple IGridProvider.GetItem(int row, int column)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | row | The ordinal number of the row. |
System.Int32 | column | The ordinal number of the column. |
Returns
Type | Description |
---|---|
IRawElementProviderSimple | The UI automation provider for the specified cell. |
Remarks
Grid coordinates are zero-based. The upper-left cell (or upper-right cell, depending on locale) has coordinates (0,0).
If a cell is empty, a UI Automation provider must still be returned in order to support the ContainingGrid property for that cell. This is possible when the layout of child elements in the grid is similar to a ragged array.
Hidden rows and columns can be loaded in the tree, depending on the provider implementation. Therefore, they will be reflected in the RowCount and ColumnCount properties. If the hidden rows and columns have not yet been loaded, they should not be counted.
IGridProvider.RowCount
Gets the total number of rows in a grid.
Declaration
int IGridProvider.RowCount { get; }
Returns
Type | Description |
---|---|
System.Int32 | The total number of rows in a grid. |
IMultipleViewProvider.CurrentView
Gets the current control-specific view.
Declaration
int IMultipleViewProvider.CurrentView { get; }
Returns
Type | Description |
---|---|
System.Int32 | The value for the current view of the UI automation element. |
IMultipleViewProvider.GetSupportedViews()
Retrieves a collection of control-specific view identifiers.
Declaration
int[] IMultipleViewProvider.GetSupportedViews()
Returns
Type | Description |
---|---|
System.Int32[] | A collection of values that identifies the views that are available for a UI automation element. |
Remarks
The collection of view identifiers must be identical across instances. View identifier values can be passed to GetViewName.
IMultipleViewProvider.GetViewName(Int32)
Retrieves the name of a control-specific view.
Declaration
string IMultipleViewProvider.GetViewName(int viewId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | viewId | The view identifier. |
Returns
Type | Description |
---|---|
System.String | A localized name for the view. |
Remarks
View identifiers can be retrieved by using GetSupportedViews. The collection of view identifiers must be identical across instances. View names must be suitable for use in text-to-speech, Braille, and other accessible applications.
IMultipleViewProvider.SetCurrentView(Int32)
Sets the current control-specific view.
Declaration
void IMultipleViewProvider.SetCurrentView(int viewId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | viewId | A view identifier. |
Remarks
View identifiers can be retrieved by using GetSupportedViews.
ISelectionProvider.CanSelectMultiple
Gets a value indicating whether the UI automation provider allows more than one child element to be selected at the same time.
Declaration
bool ISelectionProvider.CanSelectMultiple { get; }
Returns
Type | Description |
---|---|
System.Boolean | True if multiple selection is allowed; otherwise, false. |
ISelectionProvider.GetSelection()
Retrieves a UI automation provider for each child element that is selected.
Declaration
IRawElementProviderSimple[] ISelectionProvider.GetSelection()
Returns
Type | Description |
---|---|
IRawElementProviderSimple[] | A collection of UI automation providers. |
ISelectionProvider.IsSelectionRequired
Gets a value indicating whether the UI automation provider requires at least one child element to be selected.
Declaration
bool ISelectionProvider.IsSelectionRequired { get; }
Returns
Type | Description |
---|---|
System.Boolean | True if selection is required; otherwise, false. |
ITableProvider.GetColumnHeaders()
Gets a collection of UI automation providers that represents all the column headers in a table.
Declaration
IRawElementProviderSimple[] ITableProvider.GetColumnHeaders()
Returns
Type | Description |
---|---|
IRawElementProviderSimple[] | A collection of UI automation providers. |
ITableProvider.GetRowHeaders()
Retrieves a collection of UI automation providers that represents all row headers in the table.
Declaration
IRawElementProviderSimple[] ITableProvider.GetRowHeaders()
Returns
Type | Description |
---|---|
IRawElementProviderSimple[] | A collection of UI automation providers. |
ITableProvider.RowOrColumnMajor
Gets the primary direction of traversal for the table.
Declaration
RowOrColumnMajor ITableProvider.RowOrColumnMajor { get; }
Returns
Type | Description |
---|---|
RowOrColumnMajor | The primary direction of traversal. |