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
- QilPatternFactory.cs
- BufferBuilder.cs
- GridViewCommandEventArgs.cs
- LogReserveAndAppendState.cs
- TemplateLookupAction.cs
- FormViewDeleteEventArgs.cs
- storagemappingitemcollection.viewdictionary.cs
- TypeName.cs
- SmiRecordBuffer.cs
- PointAnimationClockResource.cs
- FontFamilyConverter.cs
- TransformGroup.cs
- WindowsUserNameSecurityTokenAuthenticator.cs
- DetailsViewDeleteEventArgs.cs
- LOSFormatter.cs
- PhysicalAddress.cs
- MatrixTransform.cs
- RequestNavigateEventArgs.cs
- Page.cs
- WebBaseEventKeyComparer.cs
- InternalControlCollection.cs
- PriorityQueue.cs
- SynchronizationContext.cs
- MachineKeyConverter.cs
- configsystem.cs
- TemplateField.cs
- ClientFormsAuthenticationCredentials.cs
- AssemblyNameProxy.cs
- LogicalTreeHelper.cs
- HttpDictionary.cs
- RemoteWebConfigurationHostStream.cs
- WebResourceAttribute.cs
- SqlCommandBuilder.cs
- DockAndAnchorLayout.cs
- ProtocolsSection.cs
- DeviceContext.cs
- IntSecurity.cs
- SafeRightsManagementEnvironmentHandle.cs
- ScalarRestriction.cs
- DataViewListener.cs
- DataShape.cs
- LogFlushAsyncResult.cs
- oledbmetadatacolumnnames.cs
- HiddenFieldPageStatePersister.cs
- GeneratedView.cs
- Tracer.cs
- RemotingServices.cs
- AttributeEmitter.cs
- DataException.cs
- RowsCopiedEventArgs.cs
- FaultContractInfo.cs
- TextTreeText.cs
- EventLog.cs
- CoreSwitches.cs
- Multiply.cs
- WebContext.cs
- BitmapEffectOutputConnector.cs
- MetadataSerializer.cs
- ClientProxyGenerator.cs
- RootProfilePropertySettingsCollection.cs
- XPathAncestorQuery.cs
- ClientSettingsProvider.cs
- Point.cs
- PersonalizationStateInfoCollection.cs
- OptimalBreakSession.cs
- PropertyMetadata.cs
- VisualSerializer.cs
- WindowsToolbar.cs
- DataGridHeaderBorder.cs
- WSFederationHttpBinding.cs
- MatrixKeyFrameCollection.cs
- SoapAttributeOverrides.cs
- DependencyObjectProvider.cs
- TraceContext.cs
- VariableQuery.cs
- EmptyCollection.cs
- AudioSignalProblemOccurredEventArgs.cs
- Message.cs
- SerialPinChanges.cs
- BitmapMetadataEnumerator.cs
- Queue.cs
- ClaimSet.cs
- DragDropManager.cs
- Int32Animation.cs
- RegexParser.cs
- ClientRuntimeConfig.cs
- WorkflowMarkupSerializationException.cs
- DataBoundControlHelper.cs
- SemaphoreFullException.cs
- AutomationPeer.cs
- securitycriticaldataformultiplegetandset.cs
- RichTextBoxConstants.cs
- ScriptManagerProxy.cs
- SingleAnimation.cs
- WindowsFormsSynchronizationContext.cs
- InkCanvas.cs
- UnknownWrapper.cs
- FirstMatchCodeGroup.cs
- SubMenuStyleCollectionEditor.cs
- CapabilitiesAssignment.cs