Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- EntryPointNotFoundException.cs
- ToolStripItemImageRenderEventArgs.cs
- PeerNearMe.cs
- RoleManagerModule.cs
- TabControlAutomationPeer.cs
- PropertyDescriptor.cs
- PropertyManager.cs
- DbModificationClause.cs
- RegionData.cs
- StringExpressionSet.cs
- TypeLoadException.cs
- AccessedThroughPropertyAttribute.cs
- GeneratedContractType.cs
- TypeConvertions.cs
- OrderedHashRepartitionStream.cs
- WebSysDescriptionAttribute.cs
- MenuItemBinding.cs
- DockPattern.cs
- Compress.cs
- EpmSyndicationContentDeSerializer.cs
- Signature.cs
- COM2Enum.cs
- BinaryFormatterWriter.cs
- DesigntimeLicenseContextSerializer.cs
- TabControlCancelEvent.cs
- FixedSOMFixedBlock.cs
- TypeForwardedToAttribute.cs
- SmtpFailedRecipientException.cs
- IndentedWriter.cs
- AdapterSwitches.cs
- HttpPostProtocolImporter.cs
- CustomWebEventKey.cs
- LineServices.cs
- SQLGuidStorage.cs
- SequentialUshortCollection.cs
- StylusPointDescription.cs
- OleDbPermission.cs
- HttpCookiesSection.cs
- Thumb.cs
- DesignTableCollection.cs
- ByteStream.cs
- RadioButtonBaseAdapter.cs
- DocumentReference.cs
- FragmentNavigationEventArgs.cs
- PenLineCapValidation.cs
- GenericRootAutomationPeer.cs
- DoubleAnimation.cs
- ObjectAnimationBase.cs
- ObjectDataSourceChooseMethodsPanel.cs
- BypassElement.cs
- GeometryCombineModeValidation.cs
- SoapAttributeOverrides.cs
- controlskin.cs
- ClientEventManager.cs
- HandlerFactoryCache.cs
- AlphabeticalEnumConverter.cs
- OracleLob.cs
- PropertiesTab.cs
- BitmapEffectDrawingContent.cs
- RangeValidator.cs
- MailMessageEventArgs.cs
- CmsUtils.cs
- IdentityReference.cs
- CroppedBitmap.cs
- PostBackTrigger.cs
- _OverlappedAsyncResult.cs
- PropertyCollection.cs
- XPathDocumentIterator.cs
- DataColumnChangeEvent.cs
- TextModifier.cs
- SelectionChangedEventArgs.cs
- LinkConverter.cs
- RevocationPoint.cs
- LabelLiteral.cs
- PageThemeParser.cs
- TextUtf8RawTextWriter.cs
- DateTimePickerDesigner.cs
- ResourceManagerWrapper.cs
- ProcessHostServerConfig.cs
- Parser.cs
- NetMsmqBindingElement.cs
- CodeComment.cs
- SaveRecipientRequest.cs
- KnownTypesProvider.cs
- CodeValidator.cs
- documentsequencetextpointer.cs
- RegexWorker.cs
- ScriptMethodAttribute.cs
- SourceElementsCollection.cs
- PresentationSource.cs
- SoapCodeExporter.cs
- Condition.cs
- InkCanvas.cs
- TextTreeRootNode.cs
- FormsAuthenticationUser.cs
- FixedTextView.cs
- peersecuritysettings.cs
- DefaultPropertyAttribute.cs
- RoutedEventValueSerializer.cs
- CharEntityEncoderFallback.cs