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
- HostedImpersonationContext.cs
- SessionStateContainer.cs
- SqlClientWrapperSmiStream.cs
- HMAC.cs
- TextElement.cs
- PersonalizationAdministration.cs
- RegistryKey.cs
- GeneralTransformGroup.cs
- ActivityExecutionWorkItem.cs
- OdbcParameterCollection.cs
- DesignBindingPicker.cs
- XmlFormatWriterGenerator.cs
- ManagedFilter.cs
- ObjectViewQueryResultData.cs
- safePerfProviderHandle.cs
- Triangle.cs
- XPathDocumentNavigator.cs
- StorageComplexTypeMapping.cs
- GlobalItem.cs
- SocketSettings.cs
- wmiprovider.cs
- TextRangeBase.cs
- MenuCommand.cs
- EncodedStreamFactory.cs
- DiscreteKeyFrames.cs
- SoapSchemaMember.cs
- HttpContext.cs
- CellParaClient.cs
- querybuilder.cs
- XmlTextReaderImpl.cs
- OrderedHashRepartitionEnumerator.cs
- StoryFragments.cs
- CodeCompileUnit.cs
- PersonalizationProviderHelper.cs
- RectValueSerializer.cs
- SimpleLine.cs
- ManipulationDelta.cs
- OciEnlistContext.cs
- EdmSchemaError.cs
- ToolStripRendererSwitcher.cs
- SafeRightsManagementPubHandle.cs
- DataExpression.cs
- MailDefinitionBodyFileNameEditor.cs
- MexNamedPipeBindingCollectionElement.cs
- CustomSignedXml.cs
- CreateUserErrorEventArgs.cs
- TdsParserStaticMethods.cs
- EmissiveMaterial.cs
- TransferMode.cs
- DataViewSettingCollection.cs
- ReadOnlyTernaryTree.cs
- ManipulationStartedEventArgs.cs
- AdornerPresentationContext.cs
- Encoding.cs
- TdsValueSetter.cs
- CompositionAdorner.cs
- ItemCheckedEvent.cs
- WebServicesSection.cs
- Int64Animation.cs
- TreeViewItemAutomationPeer.cs
- LineBreakRecord.cs
- ObjectDataSource.cs
- RowCache.cs
- ComponentCollection.cs
- SecurityDocument.cs
- OperationCanceledException.cs
- GorillaCodec.cs
- DocumentPageViewAutomationPeer.cs
- HtmlContainerControl.cs
- ExceptionWrapper.cs
- PrinterSettings.cs
- RowParagraph.cs
- DesignerSerializationManager.cs
- VirtualDirectoryMappingCollection.cs
- SecurityManager.cs
- SQLDecimalStorage.cs
- CacheOutputQuery.cs
- GrammarBuilderDictation.cs
- CodeMemberProperty.cs
- SerializationSectionGroup.cs
- IImplicitResourceProvider.cs
- ToolStripGripRenderEventArgs.cs
- DataGridItemEventArgs.cs
- DescendantQuery.cs
- SqlCacheDependencyDatabase.cs
- Propagator.JoinPropagator.JoinPredicateVisitor.cs
- ColorMap.cs
- Cell.cs
- PartialTrustHelpers.cs
- ProgressBarRenderer.cs
- RectangleF.cs
- TrackingParameters.cs
- typedescriptorpermission.cs
- XslNumber.cs
- HashSetEqualityComparer.cs
- ConnectionManagementElementCollection.cs
- TextTreeUndoUnit.cs
- PeerIPHelper.cs
- UpdateProgress.cs
- Exceptions.cs