Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / WinFormsIntegration / 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. 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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- UInt32.cs
- HtmlCalendarAdapter.cs
- InstanceHandleReference.cs
- MsmqIntegrationBindingCollectionElement.cs
- ScrollItemPatternIdentifiers.cs
- GeometryHitTestResult.cs
- BoundsDrawingContextWalker.cs
- ToolStripItemDataObject.cs
- InstanceValue.cs
- DefaultProxySection.cs
- pingexception.cs
- StringReader.cs
- RMEnrollmentPage3.cs
- OdbcParameterCollection.cs
- assemblycache.cs
- MimePart.cs
- TargetPerspective.cs
- ObjectCacheHost.cs
- StreamResourceInfo.cs
- CopyAttributesAction.cs
- InfoCardSymmetricCrypto.cs
- DataGridViewHeaderCell.cs
- ObjRef.cs
- TableMethodGenerator.cs
- PointF.cs
- CommandConverter.cs
- IERequestCache.cs
- PropertyDescriptorGridEntry.cs
- HttpDictionary.cs
- HScrollBar.cs
- TypeTypeConverter.cs
- Point3DKeyFrameCollection.cs
- InfiniteIntConverter.cs
- InplaceBitmapMetadataWriter.cs
- WinFormsSecurity.cs
- GridToolTip.cs
- UrlPath.cs
- PartialCachingAttribute.cs
- Range.cs
- ContextMenuAutomationPeer.cs
- WebServiceReceive.cs
- MarshalByRefObject.cs
- PointAnimation.cs
- ToolStripPanelCell.cs
- WeakReferenceList.cs
- InputScopeManager.cs
- ProxyWebPart.cs
- FileLevelControlBuilderAttribute.cs
- SqlNotificationEventArgs.cs
- DeflateEmulationStream.cs
- SharedUtils.cs
- serverconfig.cs
- PathStreamGeometryContext.cs
- ExpressionBuilderContext.cs
- precedingsibling.cs
- NotifyInputEventArgs.cs
- MsmqIntegrationProcessProtocolHandler.cs
- CallbackValidatorAttribute.cs
- MetaModel.cs
- SmiMetaDataProperty.cs
- _ConnectStream.cs
- TextServicesManager.cs
- BooleanFacetDescriptionElement.cs
- Axis.cs
- PostBackTrigger.cs
- PieceNameHelper.cs
- DataGridViewDataConnection.cs
- NameValueFileSectionHandler.cs
- InheritanceContextHelper.cs
- Lasso.cs
- ParameterElement.cs
- AuthenticatingEventArgs.cs
- ProfileSettingsCollection.cs
- StatusBarDrawItemEvent.cs
- NamespaceImport.cs
- SecurityUtils.cs
- DataGridViewTextBoxColumn.cs
- WebPartDeleteVerb.cs
- ThreadStaticAttribute.cs
- SQLUtility.cs
- MachineKeyConverter.cs
- SqlClientMetaDataCollectionNames.cs
- XPathMessageContext.cs
- XmlNodeList.cs
- SoapClientMessage.cs
- CheckBoxList.cs
- FormViewInsertEventArgs.cs
- FacetEnabledSchemaElement.cs
- CodeIterationStatement.cs
- AsyncPostBackErrorEventArgs.cs
- LinkedList.cs
- PageAsyncTask.cs
- AdornedElementPlaceholder.cs
- IResourceProvider.cs
- Lease.cs
- ParameterToken.cs
- TextSimpleMarkerProperties.cs
- AppAction.cs
- SocketAddress.cs
- TextFormattingConverter.cs