Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Framework / System / Windows / Automation / Peers / ListBoxItemAutomationPeer.cs / 1 / ListBoxItemAutomationPeer.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 ListBoxItemAutomationPeer : SelectorItemAutomationPeer, IScrollItemProvider { /// public ListBoxItemAutomationPeer(object owner, SelectorAutomationPeer selectorAutomationPeer) : base(owner, selectorAutomationPeer) { } /// override protected string GetClassNameCore() { return "ListBoxItem"; } /// override protected AutomationControlType GetAutomationControlTypeCore() { return AutomationControlType.ListItem; } /// override public object GetPattern(PatternInterface patternInterface) { if (patternInterface == PatternInterface.ScrollItem) { return this; } return base.GetPattern(patternInterface); } void IScrollItemProvider.ScrollIntoView() { ListBox parent = ItemsControlAutomationPeer.Owner as ListBox; if (parent != null) parent.ScrollIntoView(Item); } } } // 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 ListBoxItemAutomationPeer : SelectorItemAutomationPeer, IScrollItemProvider { /// public ListBoxItemAutomationPeer(object owner, SelectorAutomationPeer selectorAutomationPeer) : base(owner, selectorAutomationPeer) { } /// override protected string GetClassNameCore() { return "ListBoxItem"; } /// override protected AutomationControlType GetAutomationControlTypeCore() { return AutomationControlType.ListItem; } /// override public object GetPattern(PatternInterface patternInterface) { if (patternInterface == PatternInterface.ScrollItem) { return this; } return base.GetPattern(patternInterface); } void IScrollItemProvider.ScrollIntoView() { ListBox parent = ItemsControlAutomationPeer.Owner as ListBox; if (parent != null) parent.ScrollIntoView(Item); } } } // 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
- ForeignConstraint.cs
- ConfigurationPermission.cs
- DataServiceRequest.cs
- SessionState.cs
- DataGridState.cs
- PrintEvent.cs
- ExpressionBuilderCollection.cs
- DecoderNLS.cs
- StorageTypeMapping.cs
- BigInt.cs
- Qualifier.cs
- DoubleAnimation.cs
- SoapTypeAttribute.cs
- FilteredXmlReader.cs
- Regex.cs
- ToolStripGripRenderEventArgs.cs
- IIS7UserPrincipal.cs
- ThreadNeutralSemaphore.cs
- EventLogEntry.cs
- FontWeight.cs
- PartialClassGenerationTaskInternal.cs
- RestClientProxyHandler.cs
- DataObjectCopyingEventArgs.cs
- DashStyle.cs
- PageAsyncTask.cs
- RectConverter.cs
- Byte.cs
- CategoryNameCollection.cs
- TabControl.cs
- xml.cs
- ThreadStaticAttribute.cs
- EntityDataSourceReferenceGroup.cs
- CaseKeyBox.xaml.cs
- InvokeProviderWrapper.cs
- BinaryFormatterWriter.cs
- InheritanceContextChangedEventManager.cs
- TextBlockAutomationPeer.cs
- ObjectIDGenerator.cs
- TreeBuilderBamlTranslator.cs
- OleDbDataReader.cs
- HostExecutionContextManager.cs
- ExecutionContext.cs
- MissingSatelliteAssemblyException.cs
- ThemeDictionaryExtension.cs
- DllHostedComPlusServiceHost.cs
- XsdDateTime.cs
- PerformanceCounter.cs
- Timer.cs
- MissingMethodException.cs
- InstancePersistenceCommandException.cs
- TextTrailingWordEllipsis.cs
- ExecutionPropertyManager.cs
- DetailsViewCommandEventArgs.cs
- WebControlsSection.cs
- PrivilegedConfigurationManager.cs
- ClassicBorderDecorator.cs
- TextFormatterContext.cs
- EpmTargetTree.cs
- CatalogZoneBase.cs
- PrinterSettings.cs
- WeakReferenceEnumerator.cs
- X509IssuerSerialKeyIdentifierClause.cs
- GraphicsContainer.cs
- ObjectStateManager.cs
- DataObjectCopyingEventArgs.cs
- GenericAuthenticationEventArgs.cs
- AppSettingsSection.cs
- CopyAction.cs
- VisualStyleElement.cs
- ViewStateException.cs
- JapaneseCalendar.cs
- ServiceReference.cs
- TCPListener.cs
- VScrollProperties.cs
- KeyGestureConverter.cs
- DataGrid.cs
- GlyphTypeface.cs
- Button.cs
- TreeNodeBindingCollection.cs
- RouteParametersHelper.cs
- ReadWriteSpinLock.cs
- NativeMethods.cs
- Peer.cs
- PartialTrustVisibleAssemblyCollection.cs
- ServiceReference.cs
- XmlResolver.cs
- ToolboxBitmapAttribute.cs
- DrawingCollection.cs
- BufferedStream.cs
- PropertyMappingExceptionEventArgs.cs
- TextEditorMouse.cs
- AgileSafeNativeMemoryHandle.cs
- HeaderedContentControl.cs
- EditingCommands.cs
- SecurityListenerSettingsLifetimeManager.cs
- VisualBasicReference.cs
- AnnotationHelper.cs
- PublisherIdentityPermission.cs
- List.cs
- CodePrimitiveExpression.cs