Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Framework / System / Windows / Automation / Peers / GridViewHeaderRowPresenterAutomationPeer.cs / 1 / GridViewHeaderRowPresenterAutomationPeer.cs
using System; using System.Collections; using System.Collections.Generic; using System.Runtime.InteropServices; using System.Security; using System.Text; using System.Windows; using System.Windows.Automation.Provider; using System.Windows.Controls; using System.Windows.Controls.Primitives; using System.Windows.Interop; using System.Windows.Media; using MS.Internal; using MS.Win32; namespace System.Windows.Automation.Peers { /// public class GridViewHeaderRowPresenterAutomationPeer : FrameworkElementAutomationPeer { /// public GridViewHeaderRowPresenterAutomationPeer(GridViewHeaderRowPresenter owner) : base(owner) { } /// override protected string GetClassNameCore() { return "GridViewHeaderRowPresenter"; } /// override protected AutomationControlType GetAutomationControlTypeCore() { return AutomationControlType.Header; } /// protected override ListGetChildrenCore() { List list = base.GetChildrenCore(); List newList = new List (list.Count); if (list != null && list.Count > 0) { //GVHRP contains 2 extra column headers, one is dummy header, the other is floating header //We need to remove them from the tree foreach (AutomationPeer peer in list) { if (peer is UIElementAutomationPeer) { GridViewColumnHeader header = ((UIElementAutomationPeer)peer).Owner as GridViewColumnHeader; if (header != null && header.Role == GridViewColumnHeaderRole.Normal) { //Because GVHRP uses inverse sequence to store column headers, we need to use insert here newList.Insert(0, peer); } } } } return newList; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. using System; using System.Collections; using System.Collections.Generic; using System.Runtime.InteropServices; using System.Security; using System.Text; using System.Windows; using System.Windows.Automation.Provider; using System.Windows.Controls; using System.Windows.Controls.Primitives; using System.Windows.Interop; using System.Windows.Media; using MS.Internal; using MS.Win32; namespace System.Windows.Automation.Peers { /// public class GridViewHeaderRowPresenterAutomationPeer : FrameworkElementAutomationPeer { /// public GridViewHeaderRowPresenterAutomationPeer(GridViewHeaderRowPresenter owner) : base(owner) { } /// override protected string GetClassNameCore() { return "GridViewHeaderRowPresenter"; } /// override protected AutomationControlType GetAutomationControlTypeCore() { return AutomationControlType.Header; } /// protected override List GetChildrenCore() { List list = base.GetChildrenCore(); List newList = new List (list.Count); if (list != null && list.Count > 0) { //GVHRP contains 2 extra column headers, one is dummy header, the other is floating header //We need to remove them from the tree foreach (AutomationPeer peer in list) { if (peer is UIElementAutomationPeer) { GridViewColumnHeader header = ((UIElementAutomationPeer)peer).Owner as GridViewColumnHeader; if (header != null && header.Role == GridViewColumnHeaderRole.Normal) { //Because GVHRP uses inverse sequence to store column headers, we need to use insert here newList.Insert(0, peer); } } } } return newList; } } } // 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
- MexServiceChannelBuilder.cs
- ErrorProvider.cs
- EventManager.cs
- XmlSchemaSimpleContent.cs
- HopperCache.cs
- TextLine.cs
- RegisteredExpandoAttribute.cs
- HttpCapabilitiesEvaluator.cs
- CapabilitiesAssignment.cs
- DocumentOrderQuery.cs
- _ListenerAsyncResult.cs
- XmlCharCheckingWriter.cs
- SQLDateTimeStorage.cs
- TextFormatterContext.cs
- CommonDialog.cs
- MLangCodePageEncoding.cs
- SqlDataSourceFilteringEventArgs.cs
- cache.cs
- InternalBufferOverflowException.cs
- Int16Converter.cs
- NativeMethods.cs
- ColorAnimation.cs
- ObjectDataSourceStatusEventArgs.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- StateWorkerRequest.cs
- JavaScriptString.cs
- CryptoKeySecurity.cs
- ObjectDataSourceChooseTypePanel.cs
- DataTableMappingCollection.cs
- ProtocolsConfigurationHandler.cs
- DataServiceEntityAttribute.cs
- SvcMapFileLoader.cs
- HttpTransportManager.cs
- printdlgexmarshaler.cs
- ContainerFilterService.cs
- ListItemCollection.cs
- CollectionViewSource.cs
- LoginUtil.cs
- Attributes.cs
- Selector.cs
- DataTemplate.cs
- SQLGuidStorage.cs
- SqlMethods.cs
- MonitoringDescriptionAttribute.cs
- AdornerLayer.cs
- EntityDesignerDataSourceView.cs
- Line.cs
- TextTreeTextBlock.cs
- ProcessStartInfo.cs
- KoreanCalendar.cs
- LinkedResource.cs
- FileReader.cs
- BasicBrowserDialog.designer.cs
- GridItemCollection.cs
- AsymmetricKeyExchangeDeformatter.cs
- GeneralTransform3DGroup.cs
- EdmMember.cs
- ArrayExtension.cs
- CompilerCollection.cs
- AttributeProviderAttribute.cs
- SoapExtensionReflector.cs
- OuterGlowBitmapEffect.cs
- DiscoveryVersionConverter.cs
- IDQuery.cs
- PrintPageEvent.cs
- ApplicationDirectoryMembershipCondition.cs
- _FixedSizeReader.cs
- NetworkInterface.cs
- DBBindings.cs
- ExpandableObjectConverter.cs
- TypedReference.cs
- ViewCellRelation.cs
- DataRelation.cs
- DataGridViewAutoSizeModeEventArgs.cs
- Image.cs
- LoginStatusDesigner.cs
- TextRangeSerialization.cs
- PageHandlerFactory.cs
- SerializableTypeCodeDomSerializer.cs
- Nodes.cs
- DynamicQueryStringParameter.cs
- ClientSettingsProvider.cs
- CatalogPartCollection.cs
- RenderCapability.cs
- AttributeParameterInfo.cs
- LinearQuaternionKeyFrame.cs
- Constant.cs
- UdpDuplexChannel.cs
- Base64Encoder.cs
- FileRecordSequenceHelper.cs
- DurableServiceAttribute.cs
- DataGrid.cs
- DataControlCommands.cs
- ImageMetadata.cs
- Screen.cs
- DefaultShape.cs
- StringInfo.cs
- RTLAwareMessageBox.cs
- CollectionChangedEventManager.cs
- PropertyRef.cs