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
- FrameworkElementFactory.cs
- HotCommands.cs
- NonParentingControl.cs
- DeviceFiltersSection.cs
- regiisutil.cs
- HttpChannelHelper.cs
- PartitionedStreamMerger.cs
- ImageInfo.cs
- DoubleLinkList.cs
- WindowsListView.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- RSACryptoServiceProvider.cs
- HTMLTextWriter.cs
- ProcessModule.cs
- IApplicationTrustManager.cs
- DbgCompiler.cs
- Solver.cs
- EpmContentDeSerializer.cs
- ValueQuery.cs
- TimeSpanValidatorAttribute.cs
- SettingsContext.cs
- CommunicationObject.cs
- Solver.cs
- ItemList.cs
- AuthenticationService.cs
- SspiSecurityTokenProvider.cs
- XMLSyntaxException.cs
- RemoteWebConfigurationHostStream.cs
- DocumentStream.cs
- HtmlControl.cs
- GenericsInstances.cs
- SafeFindHandle.cs
- CallbackDebugBehavior.cs
- SqlBulkCopyColumnMapping.cs
- ColorAnimation.cs
- Frame.cs
- Color.cs
- ProxyWebPartConnectionCollection.cs
- Int32EqualityComparer.cs
- X509ChainPolicy.cs
- BitStream.cs
- ContentElementAutomationPeer.cs
- ColorTransformHelper.cs
- CodeTypeDeclarationCollection.cs
- ListBoxItemAutomationPeer.cs
- DbReferenceCollection.cs
- streamingZipPartStream.cs
- PauseStoryboard.cs
- SspiHelper.cs
- TextEndOfSegment.cs
- ArraySortHelper.cs
- PageContentAsyncResult.cs
- FixedDocument.cs
- AssemblyAttributes.cs
- EdmSchemaAttribute.cs
- EnumerableCollectionView.cs
- SafeRightsManagementHandle.cs
- InspectionWorker.cs
- _HeaderInfo.cs
- SelectedGridItemChangedEvent.cs
- DataGridRowsPresenter.cs
- RuleProcessor.cs
- NameValuePermission.cs
- DataGridViewButtonColumn.cs
- SqlCrossApplyToCrossJoin.cs
- ResourcePermissionBase.cs
- glyphs.cs
- BooleanExpr.cs
- UITypeEditor.cs
- BookmarkInfo.cs
- MdbDataFileEditor.cs
- WebPartEventArgs.cs
- _CacheStreams.cs
- X509DefaultServiceCertificateElement.cs
- IItemProperties.cs
- BamlRecords.cs
- StringKeyFrameCollection.cs
- ClientFormsIdentity.cs
- DataGridClipboardHelper.cs
- DataGridViewDataConnection.cs
- ParentQuery.cs
- TracingConnection.cs
- XPathExpr.cs
- _ScatterGatherBuffers.cs
- SplitContainer.cs
- CompiledQueryCacheEntry.cs
- DeclaredTypeElement.cs
- NullableDecimalSumAggregationOperator.cs
- InfiniteTimeSpanConverter.cs
- Positioning.cs
- OutputCache.cs
- MenuItemBindingCollection.cs
- PageCatalogPartDesigner.cs
- Selection.cs
- HTMLTagNameToTypeMapper.cs
- ListBoxItem.cs
- StylusPointPropertyId.cs
- ParamArrayAttribute.cs
- ISFClipboardData.cs
- ConcurrentQueue.cs