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
- ResourceBinder.cs
- TrackingRecord.cs
- WindowsRebar.cs
- cookiecollection.cs
- HttpCookieCollection.cs
- SQLSingleStorage.cs
- MenuAutomationPeer.cs
- Delegate.cs
- TabletCollection.cs
- Utils.cs
- XMLSchema.cs
- StringSorter.cs
- DispatcherExceptionEventArgs.cs
- IdentityValidationException.cs
- ManipulationLogic.cs
- LineBreakRecord.cs
- Material.cs
- ErrorProvider.cs
- ErrorWrapper.cs
- InvalidOperationException.cs
- BaseResourcesBuildProvider.cs
- DiagnosticSection.cs
- BuildDependencySet.cs
- Configuration.cs
- Image.cs
- SmtpNetworkElement.cs
- SQLInt16.cs
- RelationHandler.cs
- FontDifferentiator.cs
- ResourceDescriptionAttribute.cs
- ClientSponsor.cs
- CheckedListBox.cs
- RotateTransform.cs
- precedingquery.cs
- DateTimePicker.cs
- GifBitmapDecoder.cs
- ToolboxBitmapAttribute.cs
- ArrayElementGridEntry.cs
- Walker.cs
- AssociatedControlConverter.cs
- NetworkInformationException.cs
- XmlLangPropertyAttribute.cs
- DictionaryEntry.cs
- HierarchicalDataSourceConverter.cs
- ProxyAttribute.cs
- Registry.cs
- LayoutSettings.cs
- ObjectParameter.cs
- SmtpNegotiateAuthenticationModule.cs
- ResourceCodeDomSerializer.cs
- UserValidatedEventArgs.cs
- PopupControlService.cs
- DbExpressionVisitor_TResultType.cs
- SystemPens.cs
- _MultipleConnectAsync.cs
- XamlVector3DCollectionSerializer.cs
- PrtCap_Public_Simple.cs
- ExceptionHandlersDesigner.cs
- ApplicationSettingsBase.cs
- TerminatingOperationBehavior.cs
- Repeater.cs
- QilXmlReader.cs
- WindowsPen.cs
- DataGridView.cs
- AuthenticationModulesSection.cs
- DocumentViewerBaseAutomationPeer.cs
- TextContainer.cs
- ChannelServices.cs
- SymbolEqualComparer.cs
- EventRecordWrittenEventArgs.cs
- Logging.cs
- GuidelineSet.cs
- XmlNodeComparer.cs
- Error.cs
- Constant.cs
- WorkflowInspectionServices.cs
- NullableIntAverageAggregationOperator.cs
- WebServiceTypeData.cs
- QuaternionConverter.cs
- ToolStripGripRenderEventArgs.cs
- BackStopAuthenticationModule.cs
- infer.cs
- RowVisual.cs
- MethodBuilderInstantiation.cs
- TypeUtil.cs
- GraphicsPathIterator.cs
- VerificationAttribute.cs
- CroppedBitmap.cs
- OperationInvokerTrace.cs
- ResourceContainer.cs
- RuntimeComponentFilter.cs
- MetadataConversionError.cs
- BatchStream.cs
- MethodResolver.cs
- ValidatedControlConverter.cs
- BuildManager.cs
- LineVisual.cs
- OleDbFactory.cs
- TitleStyle.cs
- VisualTransition.cs