Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Framework / System / Windows / Automation / Peers / HwndHostAutomationPeer.cs / 1 / 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. 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
- DbDataAdapter.cs
- AdornerHitTestResult.cs
- PeerContact.cs
- CodePageEncoding.cs
- CompModHelpers.cs
- Authorization.cs
- DiagnosticsConfiguration.cs
- ConstNode.cs
- EventLogEntry.cs
- GroupPartitionExpr.cs
- IgnoreFlushAndCloseStream.cs
- ServiceHost.cs
- BreakRecordTable.cs
- DescendantQuery.cs
- BindingContext.cs
- OlePropertyStructs.cs
- NamespaceTable.cs
- LoadWorkflowCommand.cs
- XmlIlVisitor.cs
- FacetValueContainer.cs
- DataBoundControlHelper.cs
- PipelineModuleStepContainer.cs
- TypeConverterAttribute.cs
- KeyTime.cs
- ConcurrentBag.cs
- XsltLibrary.cs
- DoubleLinkListEnumerator.cs
- documentsequencetextpointer.cs
- AutomationPropertyInfo.cs
- RouteParameter.cs
- FontStyle.cs
- DriveNotFoundException.cs
- AppearanceEditorPart.cs
- XmlSubtreeReader.cs
- TimeSpanOrInfiniteValidator.cs
- PostBackOptions.cs
- GPRECT.cs
- PerformanceCounterCategory.cs
- PenLineJoinValidation.cs
- NetworkInterface.cs
- XmlSchemaAny.cs
- SocketCache.cs
- ToolboxComponentsCreatedEventArgs.cs
- securitycriticaldataformultiplegetandset.cs
- HtmlValidationSummaryAdapter.cs
- RowBinding.cs
- NavigationWindow.cs
- OleDbPermission.cs
- RadioButton.cs
- CachedBitmap.cs
- CodeNamespaceImport.cs
- ThreadSafeList.cs
- EncoderExceptionFallback.cs
- Freezable.cs
- DetailsViewRowCollection.cs
- DuplicateWaitObjectException.cs
- WebPartZoneAutoFormat.cs
- MouseGesture.cs
- Group.cs
- Bitmap.cs
- WebPartCatalogAddVerb.cs
- BridgeDataRecord.cs
- UInt64Converter.cs
- wpf-etw.cs
- DocumentPageView.cs
- TypeListConverter.cs
- LayoutEditorPart.cs
- ModulesEntry.cs
- ListViewInsertEventArgs.cs
- SecureConversationServiceElement.cs
- HostProtectionException.cs
- MULTI_QI.cs
- CacheMemory.cs
- ComMethodElementCollection.cs
- SoapEnvelopeProcessingElement.cs
- GridViewRow.cs
- TableCellAutomationPeer.cs
- DataColumnCollection.cs
- DataProtection.cs
- DbMetaDataCollectionNames.cs
- AutoCompleteStringCollection.cs
- LinqDataView.cs
- XmlDeclaration.cs
- ColorConverter.cs
- OdbcInfoMessageEvent.cs
- QueryResultOp.cs
- MD5CryptoServiceProvider.cs
- PackageStore.cs
- PageBuildProvider.cs
- WpfSharedXamlSchemaContext.cs
- TryLoadRunnableWorkflowCommand.cs
- WebWorkflowRole.cs
- BrowserCapabilitiesCodeGenerator.cs
- SchemaMapping.cs
- _HTTPDateParse.cs
- StructuralType.cs
- ListParaClient.cs
- DiscardableAttribute.cs
- MachineKeySection.cs
- ComponentRenameEvent.cs