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
- SqlCacheDependency.cs
- DocumentDesigner.cs
- KeySpline.cs
- RenderingBiasValidation.cs
- OSFeature.cs
- M3DUtil.cs
- NameSpaceEvent.cs
- CacheEntry.cs
- TripleDES.cs
- BitmapVisualManager.cs
- SqlUtils.cs
- ContentIterators.cs
- TaiwanCalendar.cs
- SapiAttributeParser.cs
- TripleDES.cs
- SmiEventSink_DeferedProcessing.cs
- InlineObject.cs
- LayoutDump.cs
- PathGradientBrush.cs
- Mouse.cs
- COM2ICategorizePropertiesHandler.cs
- InkCanvasAutomationPeer.cs
- CollectionContainer.cs
- TraceEventCache.cs
- RepeaterCommandEventArgs.cs
- UniqueCodeIdentifierScope.cs
- File.cs
- RoutingChannelExtension.cs
- SubpageParagraph.cs
- XmlToDatasetMap.cs
- ScriptHandlerFactory.cs
- PathFigureCollection.cs
- FamilyCollection.cs
- MetadataFile.cs
- DbProviderSpecificTypePropertyAttribute.cs
- BinaryObjectReader.cs
- RevocationPoint.cs
- EditorZone.cs
- DataTableReader.cs
- ParameterCollection.cs
- DataExpression.cs
- ListBindingHelper.cs
- RenderCapability.cs
- AesCryptoServiceProvider.cs
- SignatureHelper.cs
- VBIdentifierDesigner.xaml.cs
- DurableDispatcherAddressingFault.cs
- StringOutput.cs
- DrawingImage.cs
- DiscoveryEndpoint.cs
- DBPropSet.cs
- DefaultExpressionVisitor.cs
- RuntimeIdentifierPropertyAttribute.cs
- VirtualizedItemProviderWrapper.cs
- IntersectQueryOperator.cs
- NumericUpDown.cs
- HideDisabledControlAdapter.cs
- ZoneLinkButton.cs
- HttpCapabilitiesSectionHandler.cs
- FontNameEditor.cs
- TableRowsCollectionEditor.cs
- IsolatedStoragePermission.cs
- SafeCryptoHandles.cs
- ExpandSegmentCollection.cs
- CFStream.cs
- MachineKeySection.cs
- CompressedStack.cs
- StatusBarItem.cs
- HostedTransportConfigurationManager.cs
- XmlExpressionDumper.cs
- SafeArrayTypeMismatchException.cs
- Storyboard.cs
- ResourceExpressionEditor.cs
- EmissiveMaterial.cs
- EntityCollection.cs
- IsolatedStorageFilePermission.cs
- Span.cs
- RegexInterpreter.cs
- DataControlLinkButton.cs
- SettingsPropertyValueCollection.cs
- ListSourceHelper.cs
- SmtpReplyReader.cs
- RijndaelCryptoServiceProvider.cs
- WebPartMenu.cs
- PagerSettings.cs
- KeyedPriorityQueue.cs
- infer.cs
- ConcurrentBag.cs
- MemberDomainMap.cs
- XmlQueryType.cs
- TextParentUndoUnit.cs
- Encoding.cs
- AppDomainInstanceProvider.cs
- RichTextBox.cs
- HierarchicalDataTemplate.cs
- Unit.cs
- DataGridDesigner.cs
- ObjectTokenCategory.cs
- Int64.cs
- Rotation3D.cs