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
- WebHttpSecurity.cs
- NavigationFailedEventArgs.cs
- ApplicationCommands.cs
- PropertyStore.cs
- ISessionStateStore.cs
- DateTimeValueSerializerContext.cs
- CellIdBoolean.cs
- TextParagraphCache.cs
- RemotingException.cs
- NavigationProperty.cs
- EncoderParameter.cs
- basevalidator.cs
- SecurityDocument.cs
- FlatButtonAppearance.cs
- StronglyTypedResourceBuilder.cs
- ProcessingInstructionAction.cs
- DelegateArgument.cs
- SplineKeyFrames.cs
- DockAndAnchorLayout.cs
- GlyphRun.cs
- ResourceDisplayNameAttribute.cs
- PointConverter.cs
- ArrayTypeMismatchException.cs
- FocusChangedEventArgs.cs
- Keywords.cs
- Vars.cs
- documentsequencetextpointer.cs
- x509utils.cs
- ChineseLunisolarCalendar.cs
- AutoGeneratedFieldProperties.cs
- ResXDataNode.cs
- ListViewGroup.cs
- MetadataArtifactLoaderCompositeResource.cs
- Frame.cs
- UserControl.cs
- SecUtil.cs
- ParameterBuilder.cs
- ListenerConfig.cs
- AddIn.cs
- ParseHttpDate.cs
- SqlServices.cs
- ToolConsole.cs
- ReservationCollection.cs
- WmpBitmapDecoder.cs
- SelectorAutomationPeer.cs
- ShellProvider.cs
- Icon.cs
- InfoCardBaseException.cs
- TranslateTransform.cs
- ProfileSettings.cs
- HtmlEmptyTagControlBuilder.cs
- Annotation.cs
- UIAgentAsyncBeginRequest.cs
- MachineKeyConverter.cs
- GeneralTransform3DTo2D.cs
- DomNameTable.cs
- DataGridViewCellValidatingEventArgs.cs
- ReferentialConstraint.cs
- ExtenderControl.cs
- Range.cs
- LeaseManager.cs
- EncoderFallback.cs
- UriSection.cs
- CodeGenHelper.cs
- ExpressionValueEditor.cs
- CrossContextChannel.cs
- ToolStripItemEventArgs.cs
- RegistrationContext.cs
- NonSerializedAttribute.cs
- JpegBitmapDecoder.cs
- DataBindingHandlerAttribute.cs
- DrawingBrush.cs
- AppSettingsExpressionBuilder.cs
- MDIClient.cs
- mil_sdk_version.cs
- Rotation3DAnimationBase.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- EncoderReplacementFallback.cs
- TextPointer.cs
- VerbConverter.cs
- RenamedEventArgs.cs
- MetadataCollection.cs
- DesignerSerializerAttribute.cs
- CodeMemberField.cs
- TraceEventCache.cs
- FontInfo.cs
- SoapClientMessage.cs
- diagnosticsswitches.cs
- DesignerAttribute.cs
- SystemColorTracker.cs
- ProtectedConfigurationSection.cs
- AbsoluteQuery.cs
- QueryOperationResponseOfT.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- ExpressionBinding.cs
- CompositeKey.cs
- SafeArrayRankMismatchException.cs
- ExpressionBuilder.cs
- ScriptingAuthenticationServiceSection.cs
- MenuBindingsEditorForm.cs