/// <summary> /// Returns a System.Windows.Point that represents the clickable space that is /// on the System.Windows.UIElement that is associated with this System.Windows.Automation.Peers.FrameworkElementAutomationPeer. /// This method is called by System.Windows.Automation.Peers.AutomationPeer.GetClickablePoint(). /// </summary> /// <returns>The System.Windows.Point on the element that allows a click.</returns> protected override Point GetClickablePointCore() { // Return the clickable point of the page number TextBox when present. switch (this.OwningDataPager.DisplayMode) { case PagerDisplayMode.FirstLastPreviousNext: case PagerDisplayMode.PreviousNext: if (this.OwningDataPager.CurrentPageTextBox != null) { AutomationPeer peer = FrameworkElementAutomationPeer.FromElement(this.OwningDataPager.CurrentPageTextBox); if (peer != null) { peer.InvalidatePeer(); } else { peer = FrameworkElementAutomationPeer.CreatePeerForElement(this.OwningDataPager.CurrentPageTextBox); } if (peer != null) { return(peer.GetClickablePoint()); } } break; } return(base.GetClickablePointCore()); }
// Token: 0x0600262F RID: 9775 RVA: 0x000B639C File Offset: 0x000B459C protected override Point GetClickablePointCore() { AutomationPeer wrapperPeer = this.WrapperPeer; if (wrapperPeer != null) { return(wrapperPeer.GetClickablePoint()); } this.ThrowElementNotAvailableException(); return(new Point(double.NaN, double.NaN)); }
private static object GetClickablePoint(AutomationPeer peer) { Point pt = peer.GetClickablePoint(); return new double[] {pt.X, pt.Y}; }