Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Automation / Peers / GridViewHeaderRowPresenterAutomationPeer.cs / 1305600 / 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 = null; if (list != null) { newList = new List (list.Count); //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 = null; if (list != null) { newList = new List (list.Count); //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
- GenericPrincipal.cs
- DbDataRecord.cs
- SmiGettersStream.cs
- BevelBitmapEffect.cs
- UncommonField.cs
- DPTypeDescriptorContext.cs
- TabletDeviceInfo.cs
- UnsafeNetInfoNativeMethods.cs
- IsolatedStorageFilePermission.cs
- ItemContainerPattern.cs
- PersonalizableTypeEntry.cs
- ApplicationProxyInternal.cs
- CodeGenerator.cs
- Knowncolors.cs
- BuildProviderUtils.cs
- ScriptResourceAttribute.cs
- Codec.cs
- ConfigurationElementCollection.cs
- NullToBooleanConverter.cs
- CodeTypeOfExpression.cs
- login.cs
- UniqueConstraint.cs
- DetailsViewUpdateEventArgs.cs
- NumberAction.cs
- RegionData.cs
- TextPointerBase.cs
- ProcessThreadCollection.cs
- ChameleonKey.cs
- TemplateXamlParser.cs
- CompModSwitches.cs
- WebPartConnectionsCancelVerb.cs
- XmlNodeComparer.cs
- SecurityTokenException.cs
- ZipIOLocalFileBlock.cs
- IgnoreFlushAndCloseStream.cs
- BuildProviderAppliesToAttribute.cs
- WmlValidatorAdapter.cs
- SoapReflectionImporter.cs
- XmlAttributes.cs
- EDesignUtil.cs
- SqlMetaData.cs
- XmlDocumentFragment.cs
- LocalFileSettingsProvider.cs
- ObjectSet.cs
- LocatorManager.cs
- StringCollectionMarkupSerializer.cs
- SqlXml.cs
- SamlAuthenticationStatement.cs
- RuleSettings.cs
- StreamGeometry.cs
- EdgeModeValidation.cs
- SqlDependencyUtils.cs
- StorageBasedPackageProperties.cs
- AppSettingsExpressionBuilder.cs
- NameTable.cs
- DBParameter.cs
- Timer.cs
- RelationshipNavigation.cs
- CompModSwitches.cs
- UInt32Converter.cs
- BinaryFormatterSinks.cs
- ManualWorkflowSchedulerService.cs
- TargetParameterCountException.cs
- HttpFileCollection.cs
- TemplateBamlRecordReader.cs
- ProfessionalColors.cs
- XmlQueryTypeFactory.cs
- NativeMethods.cs
- RequestTimeoutManager.cs
- WebCategoryAttribute.cs
- ContainerUIElement3D.cs
- TabItemAutomationPeer.cs
- SessionSwitchEventArgs.cs
- RegexStringValidator.cs
- GlobalizationSection.cs
- HtmlHistory.cs
- FtpRequestCacheValidator.cs
- CodeRegionDirective.cs
- SizeAnimationUsingKeyFrames.cs
- PresentationTraceSources.cs
- LastQueryOperator.cs
- Byte.cs
- NativeMethods.cs
- ReaderContextStackData.cs
- ViewSimplifier.cs
- StateInitializationDesigner.cs
- SmtpTransport.cs
- IconHelper.cs
- VBIdentifierDesigner.xaml.cs
- XamlParser.cs
- GridViewColumnCollectionChangedEventArgs.cs
- Int64Animation.cs
- ConstraintCollection.cs
- FormViewModeEventArgs.cs
- CapiSymmetricAlgorithm.cs
- DeleteHelper.cs
- Block.cs
- PropertyChangedEventManager.cs
- WebSysDefaultValueAttribute.cs
- cryptoapiTransform.cs