Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Framework / System / Windows / Automation / Peers / ItemsControlAutomationPeer.cs / 1 / ItemsControlAutomationPeer.cs
using System;
using System.Collections;
using System.Collections.ObjectModel;
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.Data;
using System.Windows.Interop;
using System.Windows.Media;
using MS.Internal;
using MS.Internal.Hashing.PresentationFramework; // HashHelper
using MS.Win32;
namespace System.Windows.Automation.Peers
{
///
public abstract class ItemsControlAutomationPeer : FrameworkElementAutomationPeer
{
///
protected ItemsControlAutomationPeer(ItemsControl owner): base(owner)
{}
///
override public object GetPattern(PatternInterface patternInterface)
{
if(patternInterface == PatternInterface.Scroll)
{
ItemsControl owner = (ItemsControl)Owner;
if(owner.ScrollHost != null)
{
AutomationPeer scrollPeer = UIElementAutomationPeer.CreatePeerForElement(owner.ScrollHost);
if(scrollPeer != null && scrollPeer is IScrollProvider)
{
scrollPeer.EventsSource = this;
return (IScrollProvider)scrollPeer;
}
}
}
return base.GetPattern(patternInterface);
}
///
protected override List GetChildrenCore()
{
ItemsControl owner = (ItemsControl)Owner;
ItemCollection items = owner.Items;
ItemPeersStorage oldChildren = _dataChildren; //cache the old ones for possible reuse
_dataChildren = new ItemPeersStorage();
if (owner.IsGrouping)
{
CollectionView cv = owner.Items.CollectionView;
ReadOnlyObservableCollection
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PerfProviderCollection.cs
- MouseButtonEventArgs.cs
- AsyncOperation.cs
- odbcmetadatacolumnnames.cs
- UnicastIPAddressInformationCollection.cs
- LicenseManager.cs
- WebPartPersonalization.cs
- TextClipboardData.cs
- TypeDependencyAttribute.cs
- TemplateControlParser.cs
- LogLogRecord.cs
- SystemNetworkInterface.cs
- DirtyTextRange.cs
- ModuleBuilderData.cs
- CodeArrayCreateExpression.cs
- ExtenderProvidedPropertyAttribute.cs
- PreservationFileWriter.cs
- TypefaceMetricsCache.cs
- JournalEntryStack.cs
- NaturalLanguageHyphenator.cs
- LinearQuaternionKeyFrame.cs
- WrappedReader.cs
- ListView.cs
- DetailsViewUpdateEventArgs.cs
- MachineSettingsSection.cs
- EncryptedPackageFilter.cs
- DefaultSection.cs
- OperationCanceledException.cs
- CapiSafeHandles.cs
- LookupBindingPropertiesAttribute.cs
- _ListenerAsyncResult.cs
- TdsParserSessionPool.cs
- SetterBaseCollection.cs
- Stream.cs
- RelationalExpressions.cs
- NavigationPropertySingletonExpression.cs
- ProfileEventArgs.cs
- WebAdminConfigurationHelper.cs
- StatusBar.cs
- PeerNameResolver.cs
- HtmlCommandAdapter.cs
- RowsCopiedEventArgs.cs
- EndpointPerformanceCounters.cs
- DWriteFactory.cs
- SearchExpression.cs
- RefreshPropertiesAttribute.cs
- DataTemplateSelector.cs
- OperationDescription.cs
- MobileControl.cs
- ConfigurationStrings.cs
- EventItfInfo.cs
- CreateUserWizard.cs
- WebControl.cs
- XslException.cs
- TabletCollection.cs
- UrlUtility.cs
- CustomAttributeFormatException.cs
- SetMemberBinder.cs
- SoapReflectionImporter.cs
- DataGridViewRowConverter.cs
- SpeechUI.cs
- embossbitmapeffect.cs
- SqlMultiplexer.cs
- MethodAccessException.cs
- RelationshipConstraintValidator.cs
- ExceptionHandlers.cs
- DrawingAttributesDefaultValueFactory.cs
- TableLayoutRowStyleCollection.cs
- InheritanceRules.cs
- DataGridColumnHeaderAutomationPeer.cs
- remotingproxy.cs
- ResourceDictionaryCollection.cs
- StackOverflowException.cs
- RenderTargetBitmap.cs
- ControlBuilderAttribute.cs
- Reference.cs
- NetNamedPipeSecurityElement.cs
- basevalidator.cs
- SerializableAttribute.cs
- SqlUnionizer.cs
- ContractReference.cs
- Decimal.cs
- wgx_render.cs
- DesignerOptions.cs
- XmlSchemaFacet.cs
- MediaSystem.cs
- SByteStorage.cs
- IChannel.cs
- CorrelationHandle.cs
- PropertyMetadata.cs
- ItemDragEvent.cs
- BufferModesCollection.cs
- StackSpiller.Temps.cs
- ClientSettingsSection.cs
- Currency.cs
- FocusTracker.cs
- DataGridViewBindingCompleteEventArgs.cs
- RegexCharClass.cs
- Geometry.cs
- UIElement3D.cs