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
- Pair.cs
- DataGridViewHitTestInfo.cs
- SpecularMaterial.cs
- ContainerUtilities.cs
- ServiceHttpHandlerFactory.cs
- ManifestResourceInfo.cs
- WinEventWrap.cs
- OleDbPropertySetGuid.cs
- ContentPosition.cs
- ProxyElement.cs
- TransformerInfo.cs
- ReadOnlyDictionary.cs
- AutoSizeToolBoxItem.cs
- AttributeProviderAttribute.cs
- SerializationFieldInfo.cs
- ThousandthOfEmRealDoubles.cs
- ObjectListItem.cs
- PageCatalogPart.cs
- TreeIterator.cs
- OdbcInfoMessageEvent.cs
- XmlSchemaSimpleTypeRestriction.cs
- HostElement.cs
- IndicShape.cs
- InputMethodStateTypeInfo.cs
- DocumentGridPage.cs
- ToolStripDropDownMenu.cs
- MetaType.cs
- RoutedUICommand.cs
- AssociatedControlConverter.cs
- DataBindingHandlerAttribute.cs
- ReadOnlyAttribute.cs
- Property.cs
- ZipIORawDataFileBlock.cs
- VarInfo.cs
- BaseTemplatedMobileComponentEditor.cs
- ItemDragEvent.cs
- TableCellCollection.cs
- Soap.cs
- SevenBitStream.cs
- BitmapMetadataEnumerator.cs
- NotifyParentPropertyAttribute.cs
- SingleResultAttribute.cs
- RawMouseInputReport.cs
- Stylus.cs
- QueryCacheEntry.cs
- SmiSettersStream.cs
- PrintControllerWithStatusDialog.cs
- WebConfigurationManager.cs
- ContentType.cs
- DependencyPropertyChangedEventArgs.cs
- GiveFeedbackEvent.cs
- ISO2022Encoding.cs
- LogicalTreeHelper.cs
- ClientBuildManager.cs
- Brush.cs
- GridItem.cs
- FocusWithinProperty.cs
- IPipelineRuntime.cs
- XmlSchemaGroupRef.cs
- ScalarOps.cs
- DataGridViewRowEventArgs.cs
- BinHexEncoder.cs
- XmlDataSourceView.cs
- RectangleHotSpot.cs
- MonitoringDescriptionAttribute.cs
- InfiniteIntConverter.cs
- _CommandStream.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- _Semaphore.cs
- VoiceChangeEventArgs.cs
- AttachedPropertyBrowsableAttribute.cs
- FloaterBaseParagraph.cs
- ConfigurationErrorsException.cs
- TreeNodeClickEventArgs.cs
- HttpResponseMessageProperty.cs
- WebColorConverter.cs
- TreeViewItem.cs
- COM2PropertyDescriptor.cs
- LambdaCompiler.cs
- QueryExecutionOption.cs
- UnionCodeGroup.cs
- DictionaryContent.cs
- TableDesigner.cs
- KeyPressEvent.cs
- MessageBox.cs
- MemoryFailPoint.cs
- TextRenderingModeValidation.cs
- Application.cs
- UInt32.cs
- ToggleButton.cs
- DesignerActionList.cs
- SupportsEventValidationAttribute.cs
- WindowsGraphics.cs
- DataPointer.cs
- mediaeventargs.cs
- InstanceOwner.cs
- ObjectRef.cs
- ServiceControllerDesigner.cs
- XPathNavigatorReader.cs
- XsltQilFactory.cs