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
- Currency.cs
- Knowncolors.cs
- ReadOnlyCollection.cs
- DeflateStream.cs
- EditorBrowsableAttribute.cs
- PageStatePersister.cs
- MissingMethodException.cs
- BindingFormattingDialog.cs
- ScriptRegistrationManager.cs
- OptimizedTemplateContent.cs
- CodeGen.cs
- SeparatorAutomationPeer.cs
- ReflectEventDescriptor.cs
- AmbientLight.cs
- Label.cs
- CqlLexer.cs
- HostingEnvironmentSection.cs
- GiveFeedbackEventArgs.cs
- LinearKeyFrames.cs
- Operand.cs
- ConnectionPoolManager.cs
- UnmanagedMemoryStreamWrapper.cs
- SpecularMaterial.cs
- ZipIOModeEnforcingStream.cs
- ObjectStateEntry.cs
- contentDescriptor.cs
- RegisteredDisposeScript.cs
- VirtualPathProvider.cs
- ConfigurationConverterBase.cs
- EdgeProfileValidation.cs
- ServiceCredentialsElement.cs
- TypeExtensionConverter.cs
- StrongNamePublicKeyBlob.cs
- MessageQueuePermission.cs
- ServiceModelPerformanceCounters.cs
- OpCodes.cs
- RegexBoyerMoore.cs
- ConstraintCollection.cs
- Point3DAnimation.cs
- SimpleNameService.cs
- ScrollBar.cs
- TransformPattern.cs
- PropertySourceInfo.cs
- DataTableClearEvent.cs
- TabletDevice.cs
- DefaultTypeArgumentAttribute.cs
- RelOps.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- Selection.cs
- DataSetUtil.cs
- ImageCodecInfoPrivate.cs
- Freezable.cs
- BindingList.cs
- TransformCollection.cs
- MouseButton.cs
- TreeIterator.cs
- ApplicationSecurityInfo.cs
- SvcMapFileSerializer.cs
- RoleManagerEventArgs.cs
- CompilationSection.cs
- ToolStripPanelRow.cs
- RuntimeArgumentHandle.cs
- AnimationClock.cs
- NegotiateStream.cs
- EventProxy.cs
- Int32AnimationUsingKeyFrames.cs
- MembershipAdapter.cs
- Stroke.cs
- SqlFlattener.cs
- BoolLiteral.cs
- HttpContextServiceHost.cs
- ListBox.cs
- Propagator.Evaluator.cs
- OracleFactory.cs
- WebSysDescriptionAttribute.cs
- FileLevelControlBuilderAttribute.cs
- DynamicHyperLink.cs
- AsmxEndpointPickerExtension.cs
- ErrorFormatterPage.cs
- ControlDesigner.cs
- TileBrush.cs
- TraceRecords.cs
- AttributeParameterInfo.cs
- unitconverter.cs
- TextServicesCompartmentEventSink.cs
- XmlSchemaSimpleTypeRestriction.cs
- HeaderedItemsControl.cs
- CustomWebEventKey.cs
- Region.cs
- Currency.cs
- WebBrowserUriTypeConverter.cs
- TreeIterator.cs
- GC.cs
- BrowserDefinitionCollection.cs
- KeyNotFoundException.cs
- GuidelineCollection.cs
- InternalPermissions.cs
- ADMembershipProvider.cs
- FormViewDeletedEventArgs.cs
- TransactionInformation.cs