Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / wpf / src / Framework / System / Windows / Automation / Peers / HwndHostAutomationPeer.cs / 1 / 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. 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
- MissingMemberException.cs
- ListViewUpdateEventArgs.cs
- XomlCompiler.cs
- ProcessModelInfo.cs
- HtmlInputRadioButton.cs
- ECDiffieHellmanCngPublicKey.cs
- validationstate.cs
- _HeaderInfo.cs
- FrameworkContentElement.cs
- DataGridViewComboBoxColumn.cs
- WebBrowserUriTypeConverter.cs
- ThemeableAttribute.cs
- ExpandCollapsePattern.cs
- TaskFormBase.cs
- MsmqDiagnostics.cs
- WindowHelperService.cs
- ConnectionPointCookie.cs
- XamlWriterExtensions.cs
- SRDisplayNameAttribute.cs
- IsolatedStoragePermission.cs
- XmlSignificantWhitespace.cs
- BamlBinaryReader.cs
- FullTextState.cs
- BamlLocalizationDictionary.cs
- ExpressionEditorAttribute.cs
- HtmlImage.cs
- ValidationEventArgs.cs
- BitmapCache.cs
- PreProcessor.cs
- Attribute.cs
- MethodToken.cs
- LocalBuilder.cs
- CookieProtection.cs
- DivideByZeroException.cs
- HitTestFilterBehavior.cs
- SafeSecurityHandles.cs
- AnnouncementEndpoint.cs
- BindingNavigator.cs
- Visitors.cs
- Transform.cs
- SortedDictionary.cs
- ModelItemExtensions.cs
- MenuItemStyle.cs
- MultiTouchSystemGestureLogic.cs
- WindowsGraphicsCacheManager.cs
- LinqDataSource.cs
- TransformConverter.cs
- PlacementWorkspace.cs
- ClientSideQueueItem.cs
- BasePattern.cs
- SqlError.cs
- SweepDirectionValidation.cs
- TransformProviderWrapper.cs
- TypeLoadException.cs
- EmptyEnumerator.cs
- TemplateInstanceAttribute.cs
- XmlReflectionMember.cs
- GridView.cs
- ThrowOnMultipleAssignment.cs
- Win32Native.cs
- FamilyMapCollection.cs
- ProxyManager.cs
- StandardMenuStripVerb.cs
- MetadataArtifactLoaderCompositeResource.cs
- ByteBufferPool.cs
- InstanceLockedException.cs
- UserNameSecurityTokenAuthenticator.cs
- KeyPressEvent.cs
- AssemblyBuilderData.cs
- EditorAttribute.cs
- TableRow.cs
- WindowsRichEditRange.cs
- CodeAttributeArgumentCollection.cs
- ItemCheckedEvent.cs
- NativeMethods.cs
- EdmPropertyAttribute.cs
- AppearanceEditorPart.cs
- PerformanceCounterCategory.cs
- SQLInt32Storage.cs
- panel.cs
- ObjectStorage.cs
- Lookup.cs
- FrameSecurityDescriptor.cs
- InstanceDescriptor.cs
- DataServiceRequestException.cs
- StreamProxy.cs
- ModelItemCollectionImpl.cs
- XmlAttributeCache.cs
- SoapInteropTypes.cs
- DataGridViewSelectedCellCollection.cs
- FieldReference.cs
- AnnotationObservableCollection.cs
- SystemNetworkInterface.cs
- InternalDispatchObject.cs
- Attributes.cs
- BuildManagerHost.cs
- ThrowHelper.cs
- Transform3DCollection.cs
- WizardPanelChangingEventArgs.cs
- ApplicationServiceHelper.cs