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
- ApplicationFileCodeDomTreeGenerator.cs
- HwndKeyboardInputProvider.cs
- AxWrapperGen.cs
- MultiSelector.cs
- MainMenu.cs
- SqlLiftIndependentRowExpressions.cs
- ActionMessageFilterTable.cs
- HtmlControlPersistable.cs
- Quaternion.cs
- SqlInternalConnectionSmi.cs
- DataGridViewRowsAddedEventArgs.cs
- WebBrowserBase.cs
- sqlmetadatafactory.cs
- CompilationPass2Task.cs
- FocusManager.cs
- TaiwanLunisolarCalendar.cs
- RefreshPropertiesAttribute.cs
- Panel.cs
- FontFamily.cs
- XmlBaseWriter.cs
- HttpListenerException.cs
- SynchronizingStream.cs
- InvalidPrinterException.cs
- ADRoleFactory.cs
- DictionaryContent.cs
- HttpWrapper.cs
- OneToOneMappingSerializer.cs
- GridLengthConverter.cs
- Win32MouseDevice.cs
- FacetValueContainer.cs
- COM2IManagedPerPropertyBrowsingHandler.cs
- DockProviderWrapper.cs
- ObjectKeyFrameCollection.cs
- MdImport.cs
- XmlObjectSerializerReadContextComplexJson.cs
- DynamicResourceExtension.cs
- Merger.cs
- StateItem.cs
- PersonalizationProviderHelper.cs
- Int64Storage.cs
- SystemInformation.cs
- BackStopAuthenticationModule.cs
- TypeDescriptionProvider.cs
- LeaseManager.cs
- HandledMouseEvent.cs
- ViewManager.cs
- TextBoxAutoCompleteSourceConverter.cs
- DataGridAddNewRow.cs
- SettingsPropertyWrongTypeException.cs
- TemplateControlParser.cs
- SynchronizedDispatch.cs
- WebRequestModuleElement.cs
- GetRecipientRequest.cs
- Animatable.cs
- DeviceContexts.cs
- ImageSource.cs
- OledbConnectionStringbuilder.cs
- NullRuntimeConfig.cs
- DoubleStorage.cs
- DoubleAverageAggregationOperator.cs
- WpfSharedBamlSchemaContext.cs
- CapabilitiesUse.cs
- wgx_exports.cs
- Border.cs
- EmbeddedMailObjectCollectionEditor.cs
- MediaTimeline.cs
- NameNode.cs
- CssStyleCollection.cs
- DetailsViewDeleteEventArgs.cs
- HWStack.cs
- DataGridViewTextBoxEditingControl.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- ThicknessAnimationBase.cs
- Point4DValueSerializer.cs
- FlowDocumentPage.cs
- TableCell.cs
- PropertyTab.cs
- CTreeGenerator.cs
- TimeoutException.cs
- AuthStoreRoleProvider.cs
- arclist.cs
- UpDownBaseDesigner.cs
- SizeF.cs
- QilStrConcat.cs
- TableCellsCollectionEditor.cs
- EdmEntityTypeAttribute.cs
- ResourceCategoryAttribute.cs
- TextServicesPropertyRanges.cs
- IsolatedStorage.cs
- RuntimeCompatibilityAttribute.cs
- SoapProcessingBehavior.cs
- ExpandCollapseProviderWrapper.cs
- Utility.cs
- ConvertBinder.cs
- WSUtilitySpecificationVersion.cs
- MimeObjectFactory.cs
- KoreanCalendar.cs
- NavigationCommands.cs
- VerificationException.cs
- PriorityQueue.cs