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
- CollectionChangeEventArgs.cs
- Convert.cs
- XPathDocument.cs
- ContentIterators.cs
- XPathNavigator.cs
- CollectionViewGroup.cs
- HttpListenerPrefixCollection.cs
- TextEvent.cs
- PropertyChangeTracker.cs
- SqlClientWrapperSmiStream.cs
- GroupItemAutomationPeer.cs
- Translator.cs
- processwaithandle.cs
- ByteAnimation.cs
- TailCallAnalyzer.cs
- KeyboardInputProviderAcquireFocusEventArgs.cs
- DBDataPermission.cs
- GeneralTransform2DTo3D.cs
- PathFigureCollection.cs
- InvalidPrinterException.cs
- GenerateTemporaryTargetAssembly.cs
- EventEntry.cs
- TokenDescriptor.cs
- Misc.cs
- MdiWindowListItemConverter.cs
- AssemblySettingAttributes.cs
- COMException.cs
- RotateTransform.cs
- AuthorizationRuleCollection.cs
- TableLayoutCellPaintEventArgs.cs
- TextBoxAutoCompleteSourceConverter.cs
- TaskHelper.cs
- BamlTreeUpdater.cs
- SiteMapSection.cs
- TouchFrameEventArgs.cs
- WorkflowViewStateService.cs
- Helper.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- SecurityKeyType.cs
- newinstructionaction.cs
- WindowsUserNameSecurityTokenAuthenticator.cs
- DetailsViewDeletedEventArgs.cs
- Method.cs
- DataSourceHelper.cs
- FontUnitConverter.cs
- EventlogProvider.cs
- CopyAttributesAction.cs
- PowerModeChangedEventArgs.cs
- AudioSignalProblemOccurredEventArgs.cs
- ConnectionInterfaceCollection.cs
- ThemeableAttribute.cs
- WebPartVerbsEventArgs.cs
- KeyGesture.cs
- SetterBase.cs
- HttpListener.cs
- Panel.cs
- CorrelationService.cs
- NumberAction.cs
- PropertyDescriptorCollection.cs
- FileUtil.cs
- ContextQuery.cs
- SharedPerformanceCounter.cs
- SQLCharsStorage.cs
- PointCollection.cs
- TabRenderer.cs
- WebPartMenu.cs
- TextSelectionProcessor.cs
- XmlNamespaceManager.cs
- ClientSettingsSection.cs
- DocumentViewerAutomationPeer.cs
- ToolStripHighContrastRenderer.cs
- PrintControllerWithStatusDialog.cs
- NGCUIElementCollectionSerializerAsync.cs
- TableRowCollection.cs
- ImplicitInputBrush.cs
- XmlSchemaAll.cs
- XPathPatternParser.cs
- PerformanceCounterPermission.cs
- KeyValueSerializer.cs
- GacUtil.cs
- Popup.cs
- XsdDuration.cs
- DataSourceCollectionBase.cs
- FileChangesMonitor.cs
- XsltOutput.cs
- EntityTypeBase.cs
- RelationshipEnd.cs
- XmlChildNodes.cs
- RemoteWebConfigurationHost.cs
- ArrayHelper.cs
- WindowsAuthenticationModule.cs
- MSAANativeProvider.cs
- Interlocked.cs
- Constants.cs
- SystemInfo.cs
- HttpConfigurationContext.cs
- VoiceSynthesis.cs
- DelimitedListTraceListener.cs
- MarkerProperties.cs
- CreateUserWizard.cs