Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- WebScriptClientGenerator.cs
- DocumentAutomationPeer.cs
- IProvider.cs
- CachedFontFace.cs
- XmlILTrace.cs
- StylusPointDescription.cs
- ThreadStartException.cs
- LeaseManager.cs
- AdapterUtil.cs
- ByteStreamGeometryContext.cs
- GridErrorDlg.cs
- FileDataSourceCache.cs
- XXXOnTypeBuilderInstantiation.cs
- EmptyElement.cs
- HtmlInputText.cs
- TextBounds.cs
- XmlILIndex.cs
- ResourceSet.cs
- PenThread.cs
- Route.cs
- TextSearch.cs
- ExpressionBuilder.cs
- ActivityValidator.cs
- CompositeActivityMarkupSerializer.cs
- ClientRuntimeConfig.cs
- SystemIPAddressInformation.cs
- Tokenizer.cs
- PassportPrincipal.cs
- AdornerLayer.cs
- DataGridViewImageCell.cs
- SpellCheck.cs
- QilInvokeEarlyBound.cs
- CodeAttachEventStatement.cs
- CodeMethodReturnStatement.cs
- ParseHttpDate.cs
- DesignerLinkAdapter.cs
- RenderTargetBitmap.cs
- XpsDocumentEvent.cs
- MultipartContentParser.cs
- CellRelation.cs
- ListViewHitTestInfo.cs
- JsonByteArrayDataContract.cs
- ModuleBuilderData.cs
- PackageFilter.cs
- RTLAwareMessageBox.cs
- CustomTypeDescriptor.cs
- TypeLoadException.cs
- PropertyBuilder.cs
- Size.cs
- ModelMemberCollection.cs
- DocumentReference.cs
- QilPatternVisitor.cs
- ComplexTypeEmitter.cs
- WorkflowItemPresenter.cs
- SkinBuilder.cs
- SchemaImporter.cs
- XmlQualifiedNameTest.cs
- ActivationArguments.cs
- TypePresenter.xaml.cs
- IDispatchConstantAttribute.cs
- BrowserInteropHelper.cs
- SrgsItemList.cs
- DATA_BLOB.cs
- ToolStripButton.cs
- XslTransform.cs
- HtmlTable.cs
- TreeChangeInfo.cs
- GC.cs
- TextRunTypographyProperties.cs
- BaseAsyncResult.cs
- SQLSingle.cs
- OptimalBreakSession.cs
- BaseResourcesBuildProvider.cs
- FontCacheLogic.cs
- _OverlappedAsyncResult.cs
- HtmlInputRadioButton.cs
- DbMetaDataFactory.cs
- SlotInfo.cs
- HttpPostedFileWrapper.cs
- EntityDataSourceChangedEventArgs.cs
- Floater.cs
- SynchronizingStream.cs
- BindingListCollectionView.cs
- ValidatedControlConverter.cs
- PropertyBuilder.cs
- RealProxy.cs
- KnownBoxes.cs
- FrameworkRichTextComposition.cs
- PrintDialog.cs
- IgnoreFileBuildProvider.cs
- DataGridViewIntLinkedList.cs
- WrapPanel.cs
- UserUseLicenseDictionaryLoader.cs
- Compiler.cs
- SmiEventSink.cs
- TreeBuilderXamlTranslator.cs
- ProcessHostFactoryHelper.cs
- ByteStorage.cs
- ProxyFragment.cs
- EditableTreeList.cs