Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Automation / Peers / HwndHostAutomationPeer.cs / 1305600 / HwndHostAutomationPeer.cs
using System.Collections.Generic; using System.Windows.Automation; using System.Windows.Automation.Provider; using System.Windows.Interop; using System.Security; using System.Security.Permissions; using MS.Internal.Automation; namespace System.Windows.Automation.Peers { /// internal class HwndHostAutomationPeer : FrameworkElementAutomationPeer { /// public HwndHostAutomationPeer(HwndHost owner): base(owner) { IsInteropPeer = true; } /// override protected string GetClassNameCore() { return "HwndHost"; } /// override protected AutomationControlType GetAutomationControlTypeCore() { return AutomationControlType.Pane; } ////// Critical - Calls critical HwndHost.CriticalHandle. /// TreatAsSafe - Critical data is used internally and not explosed /// [SecurityCritical, SecurityTreatAsSafe] override internal InteropAutomationProvider GetInteropChild() { if (_interopProvider == null) { HostedWindowWrapper wrapper = null; HwndHost host = (HwndHost)Owner; IntPtr hwnd = host.CriticalHandle; if(hwnd != IntPtr.Zero) { wrapper = HostedWindowWrapper.CreateInternal(hwnd); } _interopProvider = new InteropAutomationProvider(wrapper, this); } return _interopProvider; } #region Data private InteropAutomationProvider _interopProvider; #endregion Data } } // 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
- WasEndpointConfigContainer.cs
- ConfigurationErrorsException.cs
- NotCondition.cs
- MouseGesture.cs
- DeflateStream.cs
- GridViewColumnHeaderAutomationPeer.cs
- XmlSchemaElement.cs
- BindingCompleteEventArgs.cs
- RangeValidator.cs
- ObjectParameterCollection.cs
- DataGridViewComboBoxEditingControl.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- CodeSnippetTypeMember.cs
- StringArrayEditor.cs
- SiteMapPath.cs
- WpfGeneratedKnownTypes.cs
- IPCCacheManager.cs
- Evaluator.cs
- TypeConverterHelper.cs
- Camera.cs
- ObjectContextServiceProvider.cs
- FixedSOMSemanticBox.cs
- ChannelServices.cs
- TokenBasedSet.cs
- CompositeDataBoundControl.cs
- PeerInvitationResponse.cs
- SubstitutionList.cs
- HorizontalAlignConverter.cs
- SafeSecurityHandles.cs
- NamespaceExpr.cs
- PeerNearMe.cs
- DecoderBestFitFallback.cs
- WSHttpBinding.cs
- RewritingSimplifier.cs
- BuildProviderCollection.cs
- GeometryHitTestResult.cs
- ProgressBar.cs
- SchemaInfo.cs
- HighlightComponent.cs
- DocumentReference.cs
- DesignerVerb.cs
- DateTimeUtil.cs
- mda.cs
- Token.cs
- MiniParameterInfo.cs
- StateDesigner.Helpers.cs
- Animatable.cs
- ContractMapping.cs
- Misc.cs
- UpdateProgress.cs
- ListViewCommandEventArgs.cs
- IFormattable.cs
- CubicEase.cs
- ElementUtil.cs
- BrowserTree.cs
- DeferredTextReference.cs
- UnsafeNativeMethods.cs
- SqlServices.cs
- Thread.cs
- GlyphCollection.cs
- DetailsViewDeletedEventArgs.cs
- TableStyle.cs
- FunctionNode.cs
- Transform3DGroup.cs
- __Filters.cs
- Subordinate.cs
- SoapIgnoreAttribute.cs
- XPathCompileException.cs
- XmlNode.cs
- ErrorHandler.cs
- CryptoProvider.cs
- QilStrConcatenator.cs
- HtmlWindow.cs
- GridPatternIdentifiers.cs
- ChannelManager.cs
- BuildManager.cs
- SqlAggregateChecker.cs
- Context.cs
- DbCommandTree.cs
- StatusBarDesigner.cs
- DefaultEventAttribute.cs
- ResXResourceReader.cs
- SimpleHandlerFactory.cs
- RepeatInfo.cs
- RangeBaseAutomationPeer.cs
- SQLInt32.cs
- SettingsProviderCollection.cs
- WindowsButton.cs
- LocalizableAttribute.cs
- InvalidAsynchronousStateException.cs
- PocoEntityKeyStrategy.cs
- RegistryKey.cs
- ModelUIElement3D.cs
- TcpSocketManager.cs
- Activator.cs
- StorageAssociationTypeMapping.cs
- EdmToObjectNamespaceMap.cs
- RenderContext.cs
- validationstate.cs
- Configuration.cs