Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- ConstraintConverter.cs
- ExpandedWrapper.cs
- PictureBox.cs
- FreezableOperations.cs
- AccessDataSourceWizardForm.cs
- Timeline.cs
- VBIdentifierTrimConverter.cs
- CompensatableSequenceActivity.cs
- DbConnectionPoolIdentity.cs
- GroupDescription.cs
- DateTimeConverter.cs
- FileDialog.cs
- SamlAssertionKeyIdentifierClause.cs
- ValidationVisibilityAttribute.cs
- BinaryConverter.cs
- SyndicationDeserializer.cs
- XmlILIndex.cs
- MemoryMappedFile.cs
- WizardPanel.cs
- EventPropertyMap.cs
- SignatureToken.cs
- WpfPayload.cs
- LayoutExceptionEventArgs.cs
- UDPClient.cs
- WasHttpHandlersInstallComponent.cs
- ScrollItemPatternIdentifiers.cs
- QueryExecutionOption.cs
- ActivityCollectionMarkupSerializer.cs
- DateTimeStorage.cs
- ResourceExpressionBuilder.cs
- HTTPRemotingHandler.cs
- StubHelpers.cs
- IncrementalReadDecoders.cs
- ReadWriteObjectLock.cs
- EncodingConverter.cs
- MimeParameters.cs
- JumpTask.cs
- EvidenceTypeDescriptor.cs
- ProfileEventArgs.cs
- Roles.cs
- GetWinFXPath.cs
- SByteStorage.cs
- HttpApplication.cs
- DataView.cs
- TextEditorCopyPaste.cs
- DecimalAnimationUsingKeyFrames.cs
- UIElementParaClient.cs
- WebPartEditorOkVerb.cs
- RectangleGeometry.cs
- AttributeSetAction.cs
- DecoderBestFitFallback.cs
- DesignerMetadata.cs
- GlobalAclOperationRequirement.cs
- TagMapInfo.cs
- XslAstAnalyzer.cs
- Color.cs
- QueryableDataSource.cs
- HealthMonitoringSectionHelper.cs
- ConstructorArgumentAttribute.cs
- XmlDictionaryWriter.cs
- ItemType.cs
- SplitterCancelEvent.cs
- smtpconnection.cs
- ErrorEventArgs.cs
- Compiler.cs
- WindowsGrip.cs
- EventLogPermission.cs
- URLEditor.cs
- RoutingTable.cs
- EventEntry.cs
- DrawingServices.cs
- ListChangedEventArgs.cs
- ContextItemManager.cs
- SpellerStatusTable.cs
- AssemblyFilter.cs
- DataServiceProviderMethods.cs
- ModuleBuilderData.cs
- DesignerActionMethodItem.cs
- CheckPair.cs
- LinearKeyFrames.cs
- DeferrableContent.cs
- XmlDeclaration.cs
- FileInfo.cs
- TextCompositionManager.cs
- RemotingConfiguration.cs
- PolicyLevel.cs
- PointCollection.cs
- ElementHostAutomationPeer.cs
- ProfileService.cs
- _DynamicWinsockMethods.cs
- SplitterEvent.cs
- GraphicsPathIterator.cs
- DataIdProcessor.cs
- WebUtil.cs
- StandardOleMarshalObject.cs
- Matrix3D.cs
- BrowserCapabilitiesFactory.cs
- DataTablePropertyDescriptor.cs
- ConfigXmlText.cs
- BamlTreeMap.cs