Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- DataGridViewCheckBoxColumn.cs
- _HelperAsyncResults.cs
- PolicyValidationException.cs
- LoginUtil.cs
- SecondaryIndexDefinition.cs
- StatusBar.cs
- ListViewItem.cs
- InvalidOleVariantTypeException.cs
- KeyValuePairs.cs
- FixedDocument.cs
- TextProperties.cs
- ConfigurationValue.cs
- TemplateParser.cs
- ActivityScheduledRecord.cs
- GeometryModel3D.cs
- LogicalTreeHelper.cs
- ControlValuePropertyAttribute.cs
- CodeStatement.cs
- FileLogRecord.cs
- shaper.cs
- securitycriticaldataClass.cs
- ApplicationActivator.cs
- CategoryState.cs
- LogExtentCollection.cs
- GZipDecoder.cs
- EditorPart.cs
- SmtpFailedRecipientsException.cs
- DataGridViewRowCancelEventArgs.cs
- TypeSystem.cs
- CompilerErrorCollection.cs
- SqlStatistics.cs
- Transform.cs
- MenuAdapter.cs
- srgsitem.cs
- CreatingCookieEventArgs.cs
- MemberMemberBinding.cs
- BamlTreeUpdater.cs
- ResourceDictionary.cs
- OracleRowUpdatingEventArgs.cs
- InstanceDataCollection.cs
- HWStack.cs
- FrameworkContextData.cs
- Monitor.cs
- PriorityBinding.cs
- ItemsChangedEventArgs.cs
- HotSpot.cs
- DataRelation.cs
- Size.cs
- ZipIOExtraFieldPaddingElement.cs
- ReferencedAssembly.cs
- CallbackTimeoutsElement.cs
- ResourceAttributes.cs
- ScriptReferenceBase.cs
- UrlPath.cs
- RadioButtonBaseAdapter.cs
- StateItem.cs
- RuntimeVariablesExpression.cs
- MimePart.cs
- FocusManager.cs
- EmptyImpersonationContext.cs
- ObjectStateEntry.cs
- ToolStripContentPanel.cs
- Renderer.cs
- SystemIPGlobalProperties.cs
- DesignerSerializerAttribute.cs
- SessionStateSection.cs
- HasCopySemanticsAttribute.cs
- ToolboxItem.cs
- DataSourceUtil.cs
- ErrorHandler.cs
- Emitter.cs
- CodeAttributeArgument.cs
- UrlMappingsSection.cs
- BaseAutoFormat.cs
- ColorTranslator.cs
- ToolStripSplitStackLayout.cs
- UrlAuthorizationModule.cs
- Decimal.cs
- CalendarBlackoutDatesCollection.cs
- ExpandCollapseProviderWrapper.cs
- ToolStripLocationCancelEventArgs.cs
- SerialStream.cs
- EventDescriptor.cs
- ReachDocumentReferenceSerializer.cs
- ICollection.cs
- TemplateField.cs
- AuthenticationService.cs
- TextEditorDragDrop.cs
- ColumnBinding.cs
- BaseTemplateBuildProvider.cs
- AnimatedTypeHelpers.cs
- DPAPIProtectedConfigurationProvider.cs
- ItemCheckedEvent.cs
- LicenseException.cs
- SmiGettersStream.cs
- lengthconverter.cs
- SoapAttributeOverrides.cs
- MatrixAnimationBase.cs
- MaskDescriptor.cs
- IImplicitResourceProvider.cs