Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / AccessibleTech / longhorn / Automation / UIAutomationClient / System / Windows / Automation / InvokePattern.cs / 1 / InvokePattern.cs
//----------------------------------------------------------------------------
//
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//
//
//
// Description: Client-side wrapper for Invoke Pattern
//
// History:
// 06/23/2003 : [....] Ported to WCP
//
//---------------------------------------------------------------------------
using System;
using System.Windows.Automation.Provider;
using MS.Internal.Automation;
namespace System.Windows.Automation
{
///
/// Represents objects that have a single, unambiguous, action associated with them.
///
/// Examples of UI that implments this includes:
/// Push buttons
/// Hyperlinks
/// Menu items
/// Radio buttons
/// Check boxes
///
#if (INTERNAL_COMPILE)
internal class InvokePattern: BasePattern
#else
public class InvokePattern: BasePattern
#endif
{
//-----------------------------------------------------
//
// Constructors
//
//-----------------------------------------------------
#region Constructors
private InvokePattern(AutomationElement el, SafePatternHandle hPattern)
: base(el, hPattern)
{
_hPattern = hPattern;
}
#endregion Constructors
//------------------------------------------------------
//
// Public Constants / Readonly Fields
//
//-----------------------------------------------------
#region Public Constants and Readonly Fields
/// Invokable pattern
public static readonly AutomationPattern Pattern = InvokePatternIdentifiers.Pattern;
/// Event ID: Invoked - event used to watch for Invokable pattern Invoked events
public static readonly AutomationEvent InvokedEvent = InvokePatternIdentifiers.InvokedEvent;
#endregion Public Constants and Readonly Fields
//------------------------------------------------------
//
// Public Methods
//
//------------------------------------------------------
#region Public Methods
///
/// Request that the control initiate its action.
/// Should return immediately without blocking.
/// There is no way to determine what happened, when it happend, or whether
/// anything happened at all.
///
///
///
/// This API does not work inside the secure execution environment.
///
///
public void Invoke()
{
UiaCoreApi.InvokePattern_Invoke(_hPattern);
}
#endregion Public Methods
//-----------------------------------------------------
//
// Public Properties
//
//------------------------------------------------------
#region Public Properties
// No properties
#endregion Public Properties
//-----------------------------------------------------
//
// Internal Methods
//
//-----------------------------------------------------
#region Internal Methods
internal static object Wrap(AutomationElement el, SafePatternHandle hPattern, bool cached)
{
return new InvokePattern(el, hPattern);
}
#endregion Internal Methods
//-----------------------------------------------------
//
// Private Fields
//
//------------------------------------------------------
#region Private Fields
private SafePatternHandle _hPattern;
#endregion Private Fields
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SingleAnimationBase.cs
- uribuilder.cs
- CodeIdentifiers.cs
- XsltLibrary.cs
- CollectionViewProxy.cs
- PrimitiveList.cs
- EllipticalNodeOperations.cs
- StopRoutingHandler.cs
- ValueSerializerAttribute.cs
- SafeCertificateContext.cs
- HierarchicalDataTemplate.cs
- PropertyPathConverter.cs
- XmlArrayItemAttribute.cs
- MultipleCopiesCollection.cs
- XsltException.cs
- ConfigurationProperty.cs
- HtmlButton.cs
- SortKey.cs
- Interfaces.cs
- ExecutionEngineException.cs
- IDispatchConstantAttribute.cs
- ComponentEvent.cs
- DataGridViewRow.cs
- ManagementInstaller.cs
- ObjectStateFormatter.cs
- BaseCodePageEncoding.cs
- Preprocessor.cs
- FontNameConverter.cs
- Instrumentation.cs
- ManualWorkflowSchedulerService.cs
- MarkerProperties.cs
- EventItfInfo.cs
- EditorZone.cs
- Geometry.cs
- DataGridViewCellParsingEventArgs.cs
- StyleSheet.cs
- TemplateBindingExpression.cs
- GridViewCommandEventArgs.cs
- AstTree.cs
- CommandSet.cs
- WeakRefEnumerator.cs
- DataServiceOperationContext.cs
- ScriptHandlerFactory.cs
- WindowsImpersonationContext.cs
- FrameworkContextData.cs
- ExternalFile.cs
- LedgerEntry.cs
- StyleReferenceConverter.cs
- OletxTransactionManager.cs
- ToolStripItemClickedEventArgs.cs
- WindowsAuthenticationEventArgs.cs
- _ListenerAsyncResult.cs
- DesignerInterfaces.cs
- EmissiveMaterial.cs
- LineMetrics.cs
- ToolboxBitmapAttribute.cs
- PropertyChangeTracker.cs
- SamlAudienceRestrictionCondition.cs
- ConstructorNeedsTagAttribute.cs
- ProfilePropertyNameValidator.cs
- SqlComparer.cs
- LoaderAllocator.cs
- UserPrincipalNameElement.cs
- DataFieldEditor.cs
- ToolStripManager.cs
- TemplateBindingExtensionConverter.cs
- ToolStripSplitStackLayout.cs
- SystemParameters.cs
- CodeTypeConstructor.cs
- MasterPageBuildProvider.cs
- NamedPermissionSet.cs
- FilterElement.cs
- TableCell.cs
- ClonableStack.cs
- InternalTypeHelper.cs
- TemplateAction.cs
- ExpressionVisitor.cs
- StdValidatorsAndConverters.cs
- Converter.cs
- XPathNodeHelper.cs
- AssemblyNameProxy.cs
- Formatter.cs
- MachineKeyConverter.cs
- CollectionViewProxy.cs
- PKCS1MaskGenerationMethod.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- PeerCollaboration.cs
- PathTooLongException.cs
- ContentElementAutomationPeer.cs
- GetPageCompletedEventArgs.cs
- ManagementScope.cs
- TextServicesHost.cs
- Exception.cs
- CodeMemberField.cs
- EventMappingSettings.cs
- MimeMultiPart.cs
- IndexedSelectQueryOperator.cs
- ImageBrush.cs
- XmlElementAttributes.cs
- DataGridTableCollection.cs