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
- MenuItemStyle.cs
- PeerPresenceInfo.cs
- SeekStoryboard.cs
- _UriSyntax.cs
- WmlPanelAdapter.cs
- Comparer.cs
- ByteKeyFrameCollection.cs
- UpdateEventArgs.cs
- DataListItemCollection.cs
- Shape.cs
- IdnMapping.cs
- XmlIncludeAttribute.cs
- WorkflowRuntime.cs
- SrgsSubset.cs
- DataListItem.cs
- FunctionQuery.cs
- MessagingDescriptionAttribute.cs
- SwitchLevelAttribute.cs
- HtmlHead.cs
- _BasicClient.cs
- AccessDataSourceWizardForm.cs
- GenericEnumConverter.cs
- querybuilder.cs
- Point3D.cs
- WebBrowserContainer.cs
- DocumentXPathNavigator.cs
- MetadataItem_Static.cs
- WebBrowserBase.cs
- WindowsImpersonationContext.cs
- ComplexTypeEmitter.cs
- HttpWebRequestElement.cs
- Token.cs
- MemberHolder.cs
- Icon.cs
- StrongNameIdentityPermission.cs
- TrustManager.cs
- ToolStripDropDownButton.cs
- AlternationConverter.cs
- ObjectSelectorEditor.cs
- SoapMessage.cs
- DesignerResources.cs
- WebPartZoneBase.cs
- KeyedByTypeCollection.cs
- SrgsElementFactoryCompiler.cs
- BufferedStream.cs
- TextFindEngine.cs
- SQLBytesStorage.cs
- ThreadInterruptedException.cs
- WebSysDisplayNameAttribute.cs
- WindowsScrollBarBits.cs
- CancellableEnumerable.cs
- StatusBar.cs
- OrderedDictionary.cs
- Floater.cs
- ServiceSecurityContext.cs
- ScriptHandlerFactory.cs
- ProjectionPath.cs
- GcHandle.cs
- FileSystemEventArgs.cs
- StickyNoteAnnotations.cs
- TreeViewHitTestInfo.cs
- FlowDocumentPage.cs
- ErrorRuntimeConfig.cs
- elementinformation.cs
- EllipseGeometry.cs
- FileVersion.cs
- ObjectListItemCollection.cs
- SqlAliaser.cs
- PolyQuadraticBezierSegment.cs
- Point3DValueSerializer.cs
- SafeNativeMethods.cs
- RequestNavigateEventArgs.cs
- WebZone.cs
- CriticalFileToken.cs
- HtmlControl.cs
- CommandArguments.cs
- TriggerCollection.cs
- WmlFormAdapter.cs
- XmlSchemaComplexContentRestriction.cs
- MimeFormReflector.cs
- DataGrid.cs
- DataGridItemCollection.cs
- BufferedStream.cs
- XmlStreamNodeWriter.cs
- NativeWindow.cs
- LineServices.cs
- TemplateField.cs
- Highlights.cs
- PageThemeCodeDomTreeGenerator.cs
- ListenerUnsafeNativeMethods.cs
- RSAPKCS1KeyExchangeFormatter.cs
- PostBackOptions.cs
- ToolStripContentPanel.cs
- ProcessModule.cs
- DataBindingList.cs
- XmlSerializerSection.cs
- FormatterConverter.cs
- CompModSwitches.cs
- ElapsedEventArgs.cs
- WorkflowDebuggerSteppingAttribute.cs