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
- SingleObjectCollection.cs
- Quaternion.cs
- DataSourceView.cs
- BamlLocalizer.cs
- DrawingCollection.cs
- ExceptionUtil.cs
- RightsManagementEncryptedStream.cs
- BufferAllocator.cs
- EntityDataSourceQueryBuilder.cs
- TileModeValidation.cs
- ImageSource.cs
- StackBuilderSink.cs
- SpellerError.cs
- DataSourceGeneratorException.cs
- CellQuery.cs
- MultiByteCodec.cs
- FileDialog_Vista.cs
- DBConnection.cs
- Guid.cs
- KeyValueConfigurationCollection.cs
- TextEditorCopyPaste.cs
- UInt64.cs
- ActivationServices.cs
- XamlInterfaces.cs
- TriggerBase.cs
- ExpandSegment.cs
- ComboBoxAutomationPeer.cs
- PageVisual.cs
- DetailsViewRow.cs
- LocalValueEnumerator.cs
- DocumentAutomationPeer.cs
- DataSet.cs
- xamlnodes.cs
- ProviderUtil.cs
- SequentialUshortCollection.cs
- ExitEventArgs.cs
- ThicknessKeyFrameCollection.cs
- DataGridComponentEditor.cs
- CodeCatchClauseCollection.cs
- CheckBoxPopupAdapter.cs
- LambdaCompiler.Binary.cs
- DataGridViewCellStyle.cs
- DocumentPageView.cs
- EndpointInfoCollection.cs
- ConfigurationSection.cs
- SafeFileMapViewHandle.cs
- FixedSOMLineRanges.cs
- AxParameterData.cs
- GradientStopCollection.cs
- CodeComment.cs
- UnsafeNativeMethods.cs
- TimeManager.cs
- LambdaCompiler.Statements.cs
- ImageDrawing.cs
- DispatcherSynchronizationContext.cs
- ObservableDictionary.cs
- MonitoringDescriptionAttribute.cs
- AtomParser.cs
- Timeline.cs
- WSHttpTransportSecurityElement.cs
- ParserOptions.cs
- CheckBoxAutomationPeer.cs
- MSG.cs
- SoapFault.cs
- FramingChannels.cs
- PackWebResponse.cs
- HttpsChannelListener.cs
- Function.cs
- DecimalStorage.cs
- DbProviderConfigurationHandler.cs
- HtmlWindow.cs
- SecureEnvironment.cs
- ReflectEventDescriptor.cs
- CLRBindingWorker.cs
- WorkItem.cs
- SystemEvents.cs
- AssemblyBuilder.cs
- TransactionScope.cs
- AccessKeyManager.cs
- DataGridTablesFactory.cs
- RoleService.cs
- SqlRecordBuffer.cs
- TextPattern.cs
- SQLConvert.cs
- XmlDataSource.cs
- IPeerNeighbor.cs
- CodeBlockBuilder.cs
- ExtensionsSection.cs
- WindowsGraphics2.cs
- SqlMethodTransformer.cs
- EngineSite.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- COM2ExtendedBrowsingHandler.cs
- FreeFormDragDropManager.cs
- DiscoveryMessageSequenceGenerator.cs
- GeneralTransform.cs
- VSDExceptions.cs
- TypeUtil.cs
- WebPartDisplayMode.cs
- AttachmentCollection.cs