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
- Label.cs
- DefaultTraceListener.cs
- basenumberconverter.cs
- validationstate.cs
- WorkflowApplication.cs
- FacetDescriptionElement.cs
- SqlDataSourceCommandParser.cs
- TextChangedEventArgs.cs
- ReaderContextStackData.cs
- SpellCheck.cs
- DataGridViewCellValidatingEventArgs.cs
- DocobjHost.cs
- AccessedThroughPropertyAttribute.cs
- InheritedPropertyDescriptor.cs
- XmlDeclaration.cs
- SettingsBindableAttribute.cs
- SqlBooleanMismatchVisitor.cs
- SrgsItemList.cs
- SqlNodeTypeOperators.cs
- ObjectStorage.cs
- InvalidPrinterException.cs
- DataGridPagerStyle.cs
- Int32CAMarshaler.cs
- SectionUpdates.cs
- PrintDocument.cs
- XmlSchemaGroupRef.cs
- Ref.cs
- DataControlImageButton.cs
- DelimitedListTraceListener.cs
- XmlNode.cs
- NetworkInformationPermission.cs
- TransformGroup.cs
- AxisAngleRotation3D.cs
- LoginName.cs
- ProfileGroupSettingsCollection.cs
- Metadata.cs
- CharacterShapingProperties.cs
- DataGridBeginningEditEventArgs.cs
- DCSafeHandle.cs
- Pkcs7Recipient.cs
- CacheMode.cs
- CompleteWizardStep.cs
- XmlDocumentType.cs
- UnknownWrapper.cs
- ZoneButton.cs
- Site.cs
- ExternalCalls.cs
- InfoCardRequestException.cs
- RoutedEventConverter.cs
- EventRecord.cs
- Span.cs
- ImportedNamespaceContextItem.cs
- SqlFormatter.cs
- HtmlTableRow.cs
- XmlnsDictionary.cs
- FrameworkEventSource.cs
- XmlQualifiedName.cs
- ResXResourceSet.cs
- NavigateEvent.cs
- SectionXmlInfo.cs
- LineVisual.cs
- TimeSpanOrInfiniteConverter.cs
- _PooledStream.cs
- CustomErrorsSectionWrapper.cs
- RoleManagerModule.cs
- LineBreakRecord.cs
- EntityDataSourceViewSchema.cs
- TypeSystemHelpers.cs
- RsaKeyIdentifierClause.cs
- RegexCapture.cs
- XPathNodeHelper.cs
- HttpHandlerAction.cs
- IxmlLineInfo.cs
- EmbossBitmapEffect.cs
- NumericUpDownAccelerationCollection.cs
- CodeDomSerializationProvider.cs
- SystemInfo.cs
- SizeAnimation.cs
- DataRecordInternal.cs
- TaiwanLunisolarCalendar.cs
- DescriptionAttribute.cs
- FontDialog.cs
- CalendarSelectionChangedEventArgs.cs
- ColorInterpolationModeValidation.cs
- WarningException.cs
- ReachSerializationUtils.cs
- UniqueCodeIdentifierScope.cs
- ConfigViewGenerator.cs
- AddDataControlFieldDialog.cs
- XmlExpressionDumper.cs
- sortedlist.cs
- DbMetaDataFactory.cs
- PhonemeEventArgs.cs
- ContextMenuStripGroup.cs
- PenThread.cs
- XmlILModule.cs
- ParseHttpDate.cs
- AuthenticationModulesSection.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- AssemblyResourceLoader.cs