Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / UIAutomation / Win32Providers / MS / Internal / AutomationProxies / WindowsNonControl.cs / 1305600 / WindowsNonControl.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // // Description: A Windows Proxy to set IsContent and IsControl to false. // By setting both IsContent and IsControl to false this will hide these // controls from the Content view of the Automation Tree. // // History: // 02/24/2005 : [....] created //--------------------------------------------------------------------------- using System; using System.Collections; using System.Windows; using System.Windows.Automation; using System.Windows.Automation.Provider; using MS.Win32; namespace MS.Internal.AutomationProxies { class WindowsNonControl: ProxyHwnd { // ----------------------------------------------------- // // Constructors // // ----------------------------------------------------- #region Constructors WindowsNonControl(IntPtr hwnd, ProxyFragment parent, int item) : base(hwnd, parent, item) { _fIsContent = false; } #endregion #region Proxy Create // Static Create method called by UIAutomation to create this proxy. // returns null if unsuccessful internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) { return Create(hwnd, idChild); } private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) { // Something is wrong if idChild is not zero if (idChild != 0) { System.Diagnostics.Debug.Assert(idChild == 0, "Invalid Child Id, idChild != 0"); throw new ArgumentOutOfRangeException("idChild", idChild, SR.Get(SRID.ShouldBeZero)); } return new WindowsNonControl(hwnd, null, idChild); } #endregion //------------------------------------------------------ // // Patterns Implementation // //----------------------------------------------------- #region ProxySimple Interface // Process all the Logical and Raw Element Properties internal override object GetElementProperty (AutomationProperty idProp) { if (idProp == AutomationElement.IsControlElementProperty) { return false; } return base.GetElementProperty (idProp); } #endregion } } // 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
- InputReportEventArgs.cs
- VScrollProperties.cs
- ImageKeyConverter.cs
- ReadingWritingEntityEventArgs.cs
- ObjectListCommandsPage.cs
- UnsafeNativeMethods.cs
- InvokeHandlers.cs
- VersionValidator.cs
- ReadOnlyPropertyMetadata.cs
- RangeBaseAutomationPeer.cs
- ColorContextHelper.cs
- ActivityScheduledQuery.cs
- WeakReferenceList.cs
- PropertyItem.cs
- SpeakProgressEventArgs.cs
- SafeRightsManagementEnvironmentHandle.cs
- RotateTransform3D.cs
- CodeTypeMember.cs
- UIAgentAsyncEndRequest.cs
- RectKeyFrameCollection.cs
- _BaseOverlappedAsyncResult.cs
- ClusterSafeNativeMethods.cs
- versioninfo.cs
- WmlTextBoxAdapter.cs
- PropertyGrid.cs
- SamlDoNotCacheCondition.cs
- tooltip.cs
- PictureBox.cs
- COM2TypeInfoProcessor.cs
- CookielessHelper.cs
- GeneralTransform3D.cs
- SoapFormatter.cs
- ExpressionLink.cs
- TextDecorationUnitValidation.cs
- GenericTextProperties.cs
- RuntimeHelpers.cs
- ZoneMembershipCondition.cs
- MatrixConverter.cs
- EdmSchemaAttribute.cs
- Vector3DAnimationBase.cs
- Metadata.cs
- ObjectConverter.cs
- DefaultShape.cs
- PassportAuthentication.cs
- ValidationEventArgs.cs
- SafeSecurityHelper.cs
- PopupRootAutomationPeer.cs
- ClientTargetSection.cs
- WebPartZoneCollection.cs
- TypeSystem.cs
- ToolStripDropDown.cs
- OdbcPermission.cs
- MetadataArtifactLoaderCompositeFile.cs
- ResourcePermissionBaseEntry.cs
- Console.cs
- DataGridViewControlCollection.cs
- SafeFindHandle.cs
- NetPeerTcpBindingElement.cs
- SubtreeProcessor.cs
- Metadata.cs
- Floater.cs
- SplitterCancelEvent.cs
- QilCloneVisitor.cs
- DataListCommandEventArgs.cs
- Msec.cs
- SqlTypesSchemaImporter.cs
- RegexStringValidator.cs
- RoleService.cs
- MouseActionValueSerializer.cs
- StackOverflowException.cs
- WebBrowser.cs
- DBBindings.cs
- CheckBox.cs
- HitTestFilterBehavior.cs
- Dispatcher.cs
- DbConnectionFactory.cs
- ListViewEditEventArgs.cs
- ReadOnlyTernaryTree.cs
- TableLayoutSettingsTypeConverter.cs
- tibetanshape.cs
- ReadOnlyTernaryTree.cs
- RoutedPropertyChangedEventArgs.cs
- StringDictionaryWithComparer.cs
- ErrorFormatterPage.cs
- ImageList.cs
- ExpressionDumper.cs
- ToolStripLocationCancelEventArgs.cs
- ExitEventArgs.cs
- StringOutput.cs
- JsonStringDataContract.cs
- DataFormats.cs
- ValidatorCollection.cs
- CompilerScopeManager.cs
- RegexWorker.cs
- ITextView.cs
- SafePipeHandle.cs
- DbBuffer.cs
- ShaderEffect.cs
- LabelLiteral.cs
- Int16AnimationUsingKeyFrames.cs