Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Integration / System / Windows / Automation / Peers / WindowsFormsHostAutomationPeer.cs / 1 / WindowsFormsHostAutomationPeer.cs
using System.Windows.Automation; using System.Windows.Automation.Provider; using System.Windows.Forms.Integration; using System.Security; using System.Security.Permissions; namespace System.Windows.Automation.Peers { /// public sealed class WindowsFormsHostAutomationPeer : FrameworkElementAutomationPeer { /// [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] public WindowsFormsHostAutomationPeer(WindowsFormsHost owner): base(owner) {} /// override protected string GetClassNameCore() { return "WindowsFormsHost"; } /// override protected AutomationControlType GetAutomationControlTypeCore() { return AutomationControlType.Pane; } /// override protected bool IsHwndHost { get { return true; }} ////// Critical - Calls critical HwndHost.Handle. /// TreatAsSafe - This demands full trust, so it's safe /// [SecurityCritical, SecurityTreatAsSafe] [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] override protected HostedWindowWrapper GetHostRawElementProviderCore() { HostedWindowWrapper host = null; WindowsFormsHost wfh = (WindowsFormsHost)Owner; IntPtr hwnd = wfh.Handle; if(hwnd != IntPtr.Zero) { host = new HostedWindowWrapper(hwnd); } return host; } internal IRawElementProviderSimple GetProvider() { return ProviderFromPeer(this); } } } // 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
- RouteItem.cs
- ToolStripDropDownItemDesigner.cs
- EventToken.cs
- DataGridViewComboBoxCell.cs
- AutomationAttributeInfo.cs
- DataContractSerializer.cs
- EventHandlersDesigner.cs
- PreDigestedSignedInfo.cs
- WebPartUserCapability.cs
- InvokeBase.cs
- FileStream.cs
- ClientApiGenerator.cs
- ThicknessConverter.cs
- RawMouseInputReport.cs
- WebEventCodes.cs
- WebPartChrome.cs
- SyndicationItem.cs
- PenThreadPool.cs
- LogEntryHeaderDeserializer.cs
- NetPeerTcpBinding.cs
- HitTestParameters3D.cs
- StylusButtonEventArgs.cs
- BitmapVisualManager.cs
- controlskin.cs
- ServerValidateEventArgs.cs
- IPGlobalProperties.cs
- Int32AnimationUsingKeyFrames.cs
- XmlValueConverter.cs
- SafeNativeMethods.cs
- TextCollapsingProperties.cs
- ToolStripComboBox.cs
- CodeDirectiveCollection.cs
- KerberosSecurityTokenAuthenticator.cs
- __ConsoleStream.cs
- ConfigurationFileMap.cs
- DataSourceSelectArguments.cs
- IndentTextWriter.cs
- smtpconnection.cs
- RadioButtonList.cs
- SettingsProperty.cs
- ErrorRuntimeConfig.cs
- BindingValueChangedEventArgs.cs
- ParallelTimeline.cs
- PageBreakRecord.cs
- FileVersionInfo.cs
- DataBindEngine.cs
- EdmValidator.cs
- SystemResourceHost.cs
- DataGridColumnHeader.cs
- Speller.cs
- GestureRecognitionResult.cs
- SchemaMerger.cs
- CatalogZoneBase.cs
- RadioButton.cs
- FreeFormDragDropManager.cs
- UnsafeNativeMethods.cs
- XmlWhitespace.cs
- UIHelper.cs
- ApplicationDirectoryMembershipCondition.cs
- sitestring.cs
- PropertyBuilder.cs
- documentation.cs
- VectorCollection.cs
- IPAddress.cs
- ResourceExpression.cs
- KeyGestureConverter.cs
- CodeAccessPermission.cs
- PropertyBuilder.cs
- DiscoveryMessageSequence.cs
- HostingEnvironment.cs
- ScriptMethodAttribute.cs
- ConsoleTraceListener.cs
- FrameworkContentElement.cs
- Signature.cs
- DiscoveryUtility.cs
- EventLogEntry.cs
- DirectionalLight.cs
- ImageClickEventArgs.cs
- ImageMetadata.cs
- EntitySqlQueryCacheKey.cs
- Visual3D.cs
- baseaxisquery.cs
- UnSafeCharBuffer.cs
- StoreContentChangedEventArgs.cs
- wmiprovider.cs
- PageThemeBuildProvider.cs
- MasterPageCodeDomTreeGenerator.cs
- StringTraceRecord.cs
- EDesignUtil.cs
- RelatedPropertyManager.cs
- DependencyObjectProvider.cs
- ButtonFlatAdapter.cs
- MarginsConverter.cs
- Attributes.cs
- EdmFunctionAttribute.cs
- _UncName.cs
- ComboBox.cs
- ArglessEventHandlerProxy.cs
- WebServiceTypeData.cs
- HttpHandlersSection.cs