public ITextRangeProvider RangeFromChild(IRawElementProviderSimple childElement) { if (!(childElement is ElementProxy)) { throw new ArgumentException(SR.Get(SRID.TextProvider_InvalidChild, "childElement")); } return((ITextRangeProvider)ElementUtil.Invoke(_peer, new DispatcherOperationCallback(RangeFromChild), childElement)); }
public bool Compare(ITextRangeProvider range) { if (!(range is TextRangeProviderWrapper)) { throw new ArgumentException(SR.Get(SRID.TextRangeProvider_InvalidRangeProvider, "range")); } return((bool)ElementUtil.Invoke(_peer, new DispatcherOperationCallback(Compare), range)); }
public IRawElementProviderFragment GetFocus() { AutomationPeer peer = Peer; if (peer == null) { return(null); } return((IRawElementProviderFragment)ElementUtil.Invoke(peer, state => ((ElementProxy)state).InContextGetFocus(), this)); }
public void SetFocus() { AutomationPeer peer = Peer; if (peer == null) { throw new ElementNotAvailableException(); } ElementUtil.Invoke(peer, state => ((ElementProxy)state).InContextSetFocus(), this); }
public int [] GetRuntimeId() { AutomationPeer peer = Peer; if (peer == null) { throw new ElementNotAvailableException(); } return((int [])ElementUtil.Invoke(peer, state => ((ElementProxy)state).InContextGetRuntimeId(), this)); }
//------------------------------------------------------ // // Interface IRawElementProviderFragmentRoot // //------------ ------------------------------------------ #region Interface IRawElementProviderFragmentRoot // Implementation of the interface that exposes this // to UIAutomation. // // Interface IRawElementProviderFragmentRoot 'derives' from // IRawElementProviderSimple and IRawElementProviderFragment, // methods from those appear first below. // // Most of the interface methods on this interface need // to get onto the Visual's context before they can access it, // so use Dispatcher.Invoke to call a private method (in the // private methods section of this class) that does the real work. // IRawElementProviderSimple methods... public object GetPatternProvider(int pattern) { AutomationPeer peer = Peer; if (peer == null) { throw new ElementNotAvailableException(); } return(ElementUtil.Invoke(peer, new DispatcherOperationCallback(InContextGetPatternProvider), pattern)); }
// IRawElementProviderFragmentRoot methods.. public IRawElementProviderFragment ElementProviderFromPoint(double x, double y) { AutomationPeer peer = Peer; if (peer == null) { return(null); } return((IRawElementProviderFragment)ElementUtil.Invoke(peer, new DispatcherOperationCallback(InContextElementProviderFromPoint), new Point(x, y))); }
public IRawElementProviderFragment GetFocus() { AutomationPeer peer = Peer; if (peer == null) { return(null); } return((IRawElementProviderFragment)ElementUtil.Invoke(peer, new DispatcherOperationCallback(InContextGetFocus), null)); }
public int [] GetRuntimeId() { AutomationPeer peer = Peer; if (peer == null) { throw new ElementNotAvailableException(); } return((int [])ElementUtil.Invoke(peer, new DispatcherOperationCallback(InContextGetRuntimeId), null)); }
public void SetFocus() { AutomationPeer peer = Peer; if (peer == null) { throw new ElementNotAvailableException(); } ElementUtil.Invoke(peer, new DispatcherOperationCallback(InContextSetFocus), null); }
// IRawElementProviderFragment methods... public IRawElementProviderFragment Navigate(NavigateDirection direction) { AutomationPeer peer = Peer; if (peer == null) { return(null); } return((IRawElementProviderFragment)ElementUtil.Invoke(peer, new DispatcherOperationCallback(InContextNavigate), direction)); }
public object GetPropertyValue(int property) { AutomationPeer peer = Peer; if (peer == null) { throw new ElementNotAvailableException(); } return(ElementUtil.Invoke(peer, new DispatcherOperationCallback(InContextGetPropertyValue), property)); }
public int CompareEndpoints(TextPatternRangeEndpoint endpoint, ITextRangeProvider targetRange, TextPatternRangeEndpoint targetEndpoint) { if (!(targetRange is TextRangeProviderWrapper)) { throw new ArgumentException(SR.Get(SRID.TextRangeProvider_InvalidRangeProvider, "targetRange")); } object[] args = new object[] { endpoint, targetRange, targetEndpoint }; return((int)ElementUtil.Invoke(_peer, new DispatcherOperationCallback(CompareEndpoints), args)); }
//------------------------------------------------------ // // Interface IItemContainerProvider // //------------------------------------------------------ #region Interface IItemContainerProvider public IRawElementProviderSimple FindItemByProperty(IRawElementProviderSimple startAfter, int propertyId, object value) { object [] args = new object[] { startAfter, propertyId, value }; return((IRawElementProviderSimple)ElementUtil.Invoke(_peer, new DispatcherOperationCallback(FindItemByProperty), args)); }
public void SetScrollPercent(double horizontalPercent, double verticalPercent) { ElementUtil.Invoke(_peer, new DispatcherOperationCallback(SetScrollPercent), new double [] { horizontalPercent, verticalPercent }); }
//------------------------------------------------------ // // Interface IScrollProvider // //------------------------------------------------------ #region Interface IScrollProvider public void Scroll(ScrollAmount horizontalAmount, ScrollAmount verticalAmount) { ElementUtil.Invoke(_peer, new DispatcherOperationCallback(Scroll), new ScrollAmount [] { horizontalAmount, verticalAmount }); }
//------------------------------------------------------ // // Interface IValueProvider // //------------------------------------------------------ #region Interface IValueProvider public void SetValue(string val) { ElementUtil.Invoke(_peer, new DispatcherOperationCallback(SetValueInternal), val); }
public void Resize(double width, double height) { ElementUtil.Invoke(_peer, new DispatcherOperationCallback(Resize), new double [] { width, height }); }
public IRawElementProviderSimple [] GetColumnHeaderItems() { return((IRawElementProviderSimple [])ElementUtil.Invoke(_peer, new DispatcherOperationCallback(GetColumnHeaderItems), null)); }
//------------------------------------------------------ // // Interface IExpandCollapseProvider // //------------------------------------------------------ #region Interface IExpandCollapseProvider public void Expand() { ElementUtil.Invoke(_peer, new DispatcherOperationCallback(Expand), null); }
//------------------------------------------------------ // // Interface IDockProvider // //------------------------------------------------------ #region Interface IDockProvider public void SetDockPosition(DockPosition dockPosition) { ElementUtil.Invoke(_peer, new DispatcherOperationCallback(SetDockPosition), dockPosition); }
//------------------------------------------------------ // // Interface ISynchronizedInputProvider // //------------------------------------------------------ #region Interface ISynchronizedInputProvider public void StartListening(SynchronizedInputType inputType) { ElementUtil.Invoke(_peer, new DispatcherOperationCallback(StartListening), inputType); }
public void Cancel() { ElementUtil.Invoke(_peer, new DispatcherOperationCallback(Cancel), null); }
//------------------------------------------------------ // // Interface IInvokeProvider // //------------------------------------------------------ #region Interface IScrollItemProvider public void ScrollIntoView() { ElementUtil.Invoke(_peer, new DispatcherOperationCallback(ScrollIntoView), null); }
public void Collapse() { ElementUtil.Invoke(_peer, new DispatcherOperationCallback(Collapse), null); }
//------------------------------------------------------ // // Interface IWindowProvider // //------------------------------------------------------ #region Interface IWindowProvider public void SetVisualState(WindowVisualState state) { ElementUtil.Invoke(_peer, new DispatcherOperationCallback(SetVisualState), state); }
//------------------------------------------------------ // // Interface IWindowProvider // //------------------------------------------------------ #region Interface ITransformProvider public void Move(double x, double y) { ElementUtil.Invoke(_peer, new DispatcherOperationCallback(Move), new double [] { x, y }); }
public bool WaitForInputIdle(int milliseconds) { return((bool)ElementUtil.Invoke(_peer, new DispatcherOperationCallback(WaitForInputIdle), milliseconds)); }
public void Rotate(double degrees) { ElementUtil.Invoke(_peer, new DispatcherOperationCallback(Rotate), degrees); }
public int [] GetSupportedViews() { return((int [])ElementUtil.Invoke(_peer, new DispatcherOperationCallback(GetSupportedViews), null)); }