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
- Converter.cs
- HealthMonitoringSection.cs
- ParserExtension.cs
- TableRowsCollectionEditor.cs
- PaintValueEventArgs.cs
- CryptoStream.cs
- ContactManager.cs
- SmiSettersStream.cs
- DelegatedStream.cs
- CurrencyManager.cs
- XmlSchemaObjectCollection.cs
- MsmqOutputSessionChannel.cs
- TypeResolver.cs
- LocalizedNameDescriptionPair.cs
- TextCharacters.cs
- SoapFormatterSinks.cs
- HMACSHA256.cs
- EventRoute.cs
- SequenceDesignerAccessibleObject.cs
- BitmapEffectInput.cs
- ContainerActivationHelper.cs
- DispatchWrapper.cs
- DeferredReference.cs
- SplitContainer.cs
- SpeakInfo.cs
- PrinterSettings.cs
- TraceProvider.cs
- AdornerLayer.cs
- Transform3D.cs
- WebPageTraceListener.cs
- HttpListenerTimeoutManager.cs
- Assert.cs
- ToggleButtonAutomationPeer.cs
- ServiceMetadataContractBehavior.cs
- WaitForChangedResult.cs
- DictionaryGlobals.cs
- RadioButtonStandardAdapter.cs
- NamespaceMapping.cs
- WsatServiceAddress.cs
- NavigatorOutput.cs
- GetWinFXPath.cs
- SQLDoubleStorage.cs
- AutomationFocusChangedEventArgs.cs
- Utils.cs
- GetPageNumberCompletedEventArgs.cs
- DataGridViewCellStyleContentChangedEventArgs.cs
- ToolStripContextMenu.cs
- NullableDoubleMinMaxAggregationOperator.cs
- DecimalConstantAttribute.cs
- XmlSchemaSequence.cs
- FormViewDeleteEventArgs.cs
- Freezable.cs
- CustomAssemblyResolver.cs
- SizeF.cs
- EntityParameter.cs
- DBCSCodePageEncoding.cs
- _SSPIWrapper.cs
- COM2EnumConverter.cs
- Matrix3DValueSerializer.cs
- SafeBitVector32.cs
- TrustLevel.cs
- SettingsAttributeDictionary.cs
- FontFamilyConverter.cs
- ipaddressinformationcollection.cs
- TextEditorMouse.cs
- XamlVector3DCollectionSerializer.cs
- DataObjectCopyingEventArgs.cs
- GPRECTF.cs
- Enlistment.cs
- HWStack.cs
- PermissionListSet.cs
- controlskin.cs
- Column.cs
- TcpClientSocketManager.cs
- TextTreeInsertUndoUnit.cs
- LongMinMaxAggregationOperator.cs
- UserPreference.cs
- XmlLoader.cs
- StandardCommands.cs
- DataListDesigner.cs
- HtmlTableCellCollection.cs
- SoapDocumentServiceAttribute.cs
- HttpCachePolicy.cs
- FamilyCollection.cs
- EntityModelBuildProvider.cs
- ThreadAbortException.cs
- SafeCancelMibChangeNotify.cs
- CompiledRegexRunnerFactory.cs
- AssemblySettingAttributes.cs
- CachedTypeface.cs
- CaseStatement.cs
- TypeElement.cs
- TextUtf8RawTextWriter.cs
- QueryActivatableWorkflowsCommand.cs
- ButtonStandardAdapter.cs
- ReachPageContentSerializer.cs
- WindowsStatic.cs
- DeflateStream.cs
- PrimaryKeyTypeConverter.cs
- Timer.cs