Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / wpf / src / UIAutomation / Win32Providers / MS / Internal / AutomationProxies / WindowsNonControl.cs / 1 / 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. //---------------------------------------------------------------------------- // //// 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
- BevelBitmapEffect.cs
- GridViewColumnCollection.cs
- DataGridViewSelectedCellCollection.cs
- PatternMatchRules.cs
- DateTimeParse.cs
- FreezableCollection.cs
- Int16AnimationBase.cs
- IList.cs
- CalculatedColumn.cs
- BaseTemplateParser.cs
- SqlException.cs
- GridViewUpdatedEventArgs.cs
- TextParentUndoUnit.cs
- Attributes.cs
- WizardStepBase.cs
- WebBrowserHelper.cs
- OletxCommittableTransaction.cs
- GifBitmapEncoder.cs
- VirtualDirectoryMappingCollection.cs
- Activator.cs
- Internal.cs
- ResourcePart.cs
- WebResourceUtil.cs
- ViewManager.cs
- LeaseManager.cs
- BackStopAuthenticationModule.cs
- DataBindingValueUIHandler.cs
- PageBuildProvider.cs
- SpeechUI.cs
- SecurityException.cs
- basevalidator.cs
- ToolStripSystemRenderer.cs
- TimelineGroup.cs
- ACE.cs
- _SSPISessionCache.cs
- AppModelKnownContentFactory.cs
- Hashtable.cs
- AjaxFrameworkAssemblyAttribute.cs
- TokenizerHelper.cs
- SHA256Cng.cs
- TCPListener.cs
- ResXResourceReader.cs
- CacheAxisQuery.cs
- HybridDictionary.cs
- DataGridViewCheckBoxCell.cs
- TraversalRequest.cs
- BamlLocalizabilityResolver.cs
- DoubleCollection.cs
- WebPartTransformer.cs
- LoginCancelEventArgs.cs
- PropertiesTab.cs
- FlowDocumentView.cs
- XmlCharCheckingReader.cs
- ValidationSummary.cs
- DuplicateWaitObjectException.cs
- TypeSystemHelpers.cs
- PropertyConverter.cs
- Int64.cs
- WSSecurityPolicy.cs
- InvalidateEvent.cs
- IsolatedStorage.cs
- RadioButton.cs
- WebService.cs
- BindingCompleteEventArgs.cs
- BoundingRectTracker.cs
- EnumerableRowCollectionExtensions.cs
- DependencyPropertyKey.cs
- CacheHelper.cs
- Sentence.cs
- TimeoutTimer.cs
- ConfigurationErrorsException.cs
- XmlSerializerFactory.cs
- SvcFileManager.cs
- future.cs
- SettingsAttributeDictionary.cs
- HttpPostedFileWrapper.cs
- TypefaceCollection.cs
- DiscoveryServerProtocol.cs
- SmtpNetworkElement.cs
- GridProviderWrapper.cs
- DataAdapter.cs
- MethodBuilderInstantiation.cs
- SslStream.cs
- ListItemConverter.cs
- ImpersonationContext.cs
- PropertyMetadata.cs
- SQLBinaryStorage.cs
- TransportBindingElementImporter.cs
- CommonObjectSecurity.cs
- AnnotationObservableCollection.cs
- TagPrefixCollection.cs
- UserPersonalizationStateInfo.cs
- SmtpCommands.cs
- DbConnectionPoolIdentity.cs
- SessionStateSection.cs
- PolygonHotSpot.cs
- ObjectRef.cs
- DesignerRegionCollection.cs
- WindowsGrip.cs
- ThreadBehavior.cs