Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Automation / Peers / HwndHostAutomationPeer.cs / 1305600 / HwndHostAutomationPeer.cs
using System.Collections.Generic; using System.Windows.Automation; using System.Windows.Automation.Provider; using System.Windows.Interop; using System.Security; using System.Security.Permissions; using MS.Internal.Automation; namespace System.Windows.Automation.Peers { /// internal class HwndHostAutomationPeer : FrameworkElementAutomationPeer { /// public HwndHostAutomationPeer(HwndHost owner): base(owner) { IsInteropPeer = true; } /// override protected string GetClassNameCore() { return "HwndHost"; } /// override protected AutomationControlType GetAutomationControlTypeCore() { return AutomationControlType.Pane; } ////// Critical - Calls critical HwndHost.CriticalHandle. /// TreatAsSafe - Critical data is used internally and not explosed /// [SecurityCritical, SecurityTreatAsSafe] override internal InteropAutomationProvider GetInteropChild() { if (_interopProvider == null) { HostedWindowWrapper wrapper = null; HwndHost host = (HwndHost)Owner; IntPtr hwnd = host.CriticalHandle; if(hwnd != IntPtr.Zero) { wrapper = HostedWindowWrapper.CreateInternal(hwnd); } _interopProvider = new InteropAutomationProvider(wrapper, this); } return _interopProvider; } #region Data private InteropAutomationProvider _interopProvider; #endregion Data } } // 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
- SqlHelper.cs
- SqlReferenceCollection.cs
- PropertyChangingEventArgs.cs
- SimpleColumnProvider.cs
- ConfigWriter.cs
- MeshGeometry3D.cs
- ListenerElementsCollection.cs
- AppDomain.cs
- NameTable.cs
- GroupLabel.cs
- HttpCapabilitiesBase.cs
- securitymgrsite.cs
- TextSerializer.cs
- XmlSchemaAnyAttribute.cs
- MultipleViewPattern.cs
- DateTimeFormat.cs
- ParameterReplacerVisitor.cs
- SymbolMethod.cs
- Screen.cs
- RegexWriter.cs
- EtwTrace.cs
- HashHelper.cs
- _NestedSingleAsyncResult.cs
- SkipQueryOptionExpression.cs
- DataGridCellAutomationPeer.cs
- ArrangedElement.cs
- Literal.cs
- _Rfc2616CacheValidators.cs
- FileChangeNotifier.cs
- DataGridViewColumnCollection.cs
- BookmarkScopeManager.cs
- ItemsControl.cs
- ConnectionPoolManager.cs
- ExpressionStringBuilder.cs
- ProtocolsConfiguration.cs
- Descriptor.cs
- FontDialog.cs
- TransformerInfoCollection.cs
- securestring.cs
- Environment.cs
- RightsManagementEncryptedStream.cs
- DataStreams.cs
- ScriptControlManager.cs
- ConfigurationSectionHelper.cs
- Metadata.cs
- TypeListConverter.cs
- FontEditor.cs
- WsdlImporterElementCollection.cs
- TypeGenericEnumerableViewSchema.cs
- _NetworkingPerfCounters.cs
- TcpTransportManager.cs
- VectorAnimationBase.cs
- SoundPlayerAction.cs
- MessageDesigner.cs
- FontStyle.cs
- AllMembershipCondition.cs
- Quaternion.cs
- X509ChainElement.cs
- Axis.cs
- ContractCodeDomInfo.cs
- PropertyDescriptorCollection.cs
- EtwTrace.cs
- MetadataItem_Static.cs
- SchemaTableOptionalColumn.cs
- ValueTypeFieldReference.cs
- ZipIOExtraField.cs
- TypeForwardedFromAttribute.cs
- QueryActivatableWorkflowsCommand.cs
- DataControlField.cs
- WebZone.cs
- ReflectEventDescriptor.cs
- WhitespaceReader.cs
- ServerIdentity.cs
- DelayDesigner.cs
- CharConverter.cs
- ArrayListCollectionBase.cs
- SetterBase.cs
- NonBatchDirectoryCompiler.cs
- CryptoHelper.cs
- Partitioner.cs
- SafeNativeMethods.cs
- Parallel.cs
- SelfIssuedSamlTokenFactory.cs
- CollectionContainer.cs
- SmiMetaData.cs
- XPathQilFactory.cs
- TextChange.cs
- ConfigurationStrings.cs
- RtfToken.cs
- BaseProcessProtocolHandler.cs
- TreeNodeMouseHoverEvent.cs
- XPathException.cs
- UnauthorizedAccessException.cs
- MessageDescription.cs
- XmlChildEnumerator.cs
- SafeCertificateStore.cs
- httpstaticobjectscollection.cs
- ScrollEvent.cs
- CounterSetInstanceCounterDataSet.cs
- UpdatePanelTriggerCollection.cs