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
- IdentifierCreationService.cs
- EncryptedData.cs
- WorkflowRuntimeServiceElement.cs
- XmlBoundElement.cs
- ErrorHandler.cs
- WindowsFormsSynchronizationContext.cs
- DebugView.cs
- StateMachine.cs
- SpnEndpointIdentityExtension.cs
- MessageDroppedTraceRecord.cs
- TdsParserHelperClasses.cs
- EditorPartCollection.cs
- Label.cs
- FlowLayout.cs
- ModuleElement.cs
- Helpers.cs
- EffectiveValueEntry.cs
- TagElement.cs
- SqlCommandBuilder.cs
- SrgsDocumentParser.cs
- Exception.cs
- Group.cs
- XmlSubtreeReader.cs
- AddingNewEventArgs.cs
- XmlCharacterData.cs
- ProtocolInformationReader.cs
- DodSequenceMerge.cs
- TileBrush.cs
- GridSplitter.cs
- MemberListBinding.cs
- ListItem.cs
- TreeNodeStyle.cs
- NumberFormatter.cs
- TreeViewItemAutomationPeer.cs
- EventProxy.cs
- Transform3DGroup.cs
- InstanceCollisionException.cs
- ComponentResourceKey.cs
- SchemaImporterExtensionElement.cs
- XmlCharCheckingReader.cs
- RawStylusInput.cs
- AttributeXamlType.cs
- PublisherIdentityPermission.cs
- CopyCodeAction.cs
- ErrorsHelper.cs
- DtdParser.cs
- NumericExpr.cs
- ObjectSecurity.cs
- AutoGeneratedField.cs
- OletxDependentTransaction.cs
- X509Extension.cs
- CqlLexer.cs
- TraceEventCache.cs
- AbandonedMutexException.cs
- ByteStreamMessageEncoder.cs
- BamlResourceContent.cs
- Vector.cs
- DataServiceQueryOfT.cs
- RightsManagementInformation.cs
- Tokenizer.cs
- BrowserDefinition.cs
- FileResponseElement.cs
- control.ime.cs
- FileUtil.cs
- GridItemProviderWrapper.cs
- OracleDataAdapter.cs
- ScriptingAuthenticationServiceSection.cs
- ActiveXHost.cs
- MimeMultiPart.cs
- TypeProvider.cs
- ToggleButton.cs
- Duration.cs
- RealProxy.cs
- TransferRequestHandler.cs
- OpenFileDialog.cs
- DnsElement.cs
- StyleBamlRecordReader.cs
- PageParserFilter.cs
- HtmlAnchor.cs
- TypeElement.cs
- SafeFindHandle.cs
- CommandBindingCollection.cs
- SafeNativeMemoryHandle.cs
- UnmanagedHandle.cs
- SystemIPInterfaceStatistics.cs
- StandardOleMarshalObject.cs
- Attributes.cs
- SqlTypeConverter.cs
- ReadOnlyDataSourceView.cs
- RuntimeVariablesExpression.cs
- NotCondition.cs
- EntryPointNotFoundException.cs
- QueryStack.cs
- ForeignKeyConstraint.cs
- Permission.cs
- StringReader.cs
- EdmFunctionAttribute.cs
- BuildProvider.cs
- Math.cs
- UserInitiatedNavigationPermission.cs