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
- Point3D.cs
- ObjectViewFactory.cs
- Matrix3DStack.cs
- VisualStyleRenderer.cs
- RenamedEventArgs.cs
- ProtectedConfigurationSection.cs
- BridgeDataRecord.cs
- CreateUserErrorEventArgs.cs
- XmlDocumentType.cs
- TypeResolvingOptionsAttribute.cs
- HMACMD5.cs
- DateTimeStorage.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- InlineUIContainer.cs
- TextEditor.cs
- NavigatorInvalidBodyAccessException.cs
- InputLanguageProfileNotifySink.cs
- IResourceProvider.cs
- RoleManagerModule.cs
- ModelProperty.cs
- SubstitutionDesigner.cs
- ClassicBorderDecorator.cs
- GradientStop.cs
- ConstraintStruct.cs
- TouchPoint.cs
- BroadcastEventHelper.cs
- ProgressChangedEventArgs.cs
- DataControlPagerLinkButton.cs
- BackStopAuthenticationModule.cs
- IImplicitResourceProvider.cs
- ItemsControlAutomationPeer.cs
- ComponentConverter.cs
- ToolStripButton.cs
- DataRow.cs
- __Filters.cs
- CollectionBase.cs
- OleDbInfoMessageEvent.cs
- XmlNamespaceMappingCollection.cs
- HttpRawResponse.cs
- PaintEvent.cs
- Boolean.cs
- WsatTransactionHeader.cs
- HyperLinkColumn.cs
- TypeInfo.cs
- SizeChangedEventArgs.cs
- processwaithandle.cs
- CertificateManager.cs
- DataServiceQueryException.cs
- InvariantComparer.cs
- ZoneLinkButton.cs
- SqlRowUpdatingEvent.cs
- XsltOutput.cs
- Size3D.cs
- XmlSchemaExporter.cs
- SiteOfOriginContainer.cs
- ValidationSummary.cs
- PersistenceTypeAttribute.cs
- StateMachineAction.cs
- UnsafeNativeMethods.cs
- DataGridViewCellEventArgs.cs
- ToolStripItemTextRenderEventArgs.cs
- RIPEMD160.cs
- DataGridViewCheckBoxCell.cs
- XmlLanguage.cs
- InkPresenter.cs
- ImageAutomationPeer.cs
- Matrix.cs
- TextEditorCopyPaste.cs
- WebPartConnectionsConfigureVerb.cs
- NullableDecimalSumAggregationOperator.cs
- NeutralResourcesLanguageAttribute.cs
- ColumnBinding.cs
- CheckableControlBaseAdapter.cs
- CompiledXpathExpr.cs
- ByteKeyFrameCollection.cs
- BCLDebug.cs
- EmbeddedMailObjectsCollection.cs
- TemplatingOptionsDialog.cs
- DataControlCommands.cs
- PersistenceProviderFactory.cs
- ProcessModelSection.cs
- BinaryObjectWriter.cs
- DataBindEngine.cs
- HMACMD5.cs
- SqlDataSourceParameterParser.cs
- CmsInterop.cs
- ImmutableAssemblyCacheEntry.cs
- FormViewDeleteEventArgs.cs
- DataGridItem.cs
- TrackingExtract.cs
- EdmSchemaError.cs
- XmlArrayAttribute.cs
- ElementMarkupObject.cs
- TagPrefixInfo.cs
- DataGridViewTopLeftHeaderCell.cs
- Section.cs
- PropertyGridCommands.cs
- SerializerWriterEventHandlers.cs
- PermissionSet.cs
- StaticExtensionConverter.cs