IRawElementProviderSimple[] ITableProvider.GetColumnHeaders() { if ((this.OwningDataGrid.HeadersVisibility & DataGridHeadersVisibility.Column) == DataGridHeadersVisibility.Column) { List <IRawElementProviderSimple> providers = new List <IRawElementProviderSimple>(); DataGridColumnHeadersPresenter dataGridColumnHeadersPresenter = this.OwningDataGrid.ColumnHeadersPresenter; if (dataGridColumnHeadersPresenter != null) { DataGridColumnHeadersPresenterAutomationPeer dataGridColumnHeadersPresenterPeer = dataGridColumnHeadersPresenter.GetAutomationPeer() as DataGridColumnHeadersPresenterAutomationPeer; if (dataGridColumnHeadersPresenterPeer != null) { for (int i = 0; i < this.OwningDataGrid.Columns.Count; i++) { AutomationPeer peer = dataGridColumnHeadersPresenterPeer.FindOrCreateItemAutomationPeer(this.OwningDataGrid.Columns[i]); if (peer != null) { providers.Add(ProviderFromPeer(peer)); } } if (providers.Count > 0) { return(providers.ToArray()); } } } } return(null); }
/// <summary>Retrieves a collection of UI Automation providers representing all the column headers associated with a table item or cell.</summary> /// <returns>A collection of UI Automation providers. </returns> // Token: 0x060025A6 RID: 9638 RVA: 0x000B4C68 File Offset: 0x000B2E68 IRawElementProviderSimple[] ITableItemProvider.GetColumnHeaderItems() { if (this.OwningDataGrid != null && (this.OwningDataGrid.HeadersVisibility & DataGridHeadersVisibility.Column) == DataGridHeadersVisibility.Column && this.OwningDataGrid.ColumnHeadersPresenter != null) { DataGridColumnHeadersPresenterAutomationPeer dataGridColumnHeadersPresenterAutomationPeer = UIElementAutomationPeer.CreatePeerForElement(this.OwningDataGrid.ColumnHeadersPresenter) as DataGridColumnHeadersPresenterAutomationPeer; if (dataGridColumnHeadersPresenterAutomationPeer != null) { AutomationPeer automationPeer = dataGridColumnHeadersPresenterAutomationPeer.FindOrCreateItemAutomationPeer(this._column); if (automationPeer != null) { return(new List <IRawElementProviderSimple>(1) { base.ProviderFromPeer(automationPeer) }.ToArray()); } } } return(null); }
public DataGridColumnHeaderItemAutomationPeer(Object item, System.Windows.Controls.DataGridColumn column, DataGridColumnHeadersPresenterAutomationPeer peer) : base (default(Object), default(ItemsControlAutomationPeer)) { }
public DataGridColumnHeaderItemAutomationPeer(object item, DataGridColumn column, DataGridColumnHeadersPresenterAutomationPeer peer) :base(item, peer) { _column = column; }
public DataGridColumnHeaderItemAutomationPeer(Object item, System.Windows.Controls.DataGridColumn column, DataGridColumnHeadersPresenterAutomationPeer peer) : base(default(Object), default(ItemsControlAutomationPeer)) { }
public DataGridColumnHeaderItemAutomationPeer(object item, DataGridColumn column, DataGridColumnHeadersPresenterAutomationPeer peer) : base(item, peer) { _column = column; }