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
- TreeNodeEventArgs.cs
- BitmapInitialize.cs
- WebCategoryAttribute.cs
- SymLanguageVendor.cs
- BamlStream.cs
- UdpTransportBindingElement.cs
- ModulesEntry.cs
- DisposableCollectionWrapper.cs
- DeploymentSection.cs
- UserControlAutomationPeer.cs
- TimeStampChecker.cs
- CorrelationTokenTypeConvertor.cs
- RegexCapture.cs
- StorageEndPropertyMapping.cs
- NativeMethods.cs
- FormView.cs
- ObjectQueryProvider.cs
- DataServiceStreamProviderWrapper.cs
- ReadOnlyHierarchicalDataSource.cs
- SoapMessage.cs
- TabletDeviceInfo.cs
- DebugTrace.cs
- ContentElement.cs
- DictionaryManager.cs
- ChannelSinkStacks.cs
- PlanCompilerUtil.cs
- RadioButtonAutomationPeer.cs
- DetailsView.cs
- RegexParser.cs
- AutoResizedEvent.cs
- COM2Enum.cs
- SkipStoryboardToFill.cs
- CapabilitiesState.cs
- _KerberosClient.cs
- DocumentPageViewAutomationPeer.cs
- rsa.cs
- XXXOnTypeBuilderInstantiation.cs
- ElementMarkupObject.cs
- Module.cs
- FlowLayoutSettings.cs
- ZeroOpNode.cs
- DataServiceRequestException.cs
- DbConnectionPoolIdentity.cs
- MiniParameterInfo.cs
- SrgsDocument.cs
- HandlerBase.cs
- PageCatalogPart.cs
- StrongNameKeyPair.cs
- AmbientProperties.cs
- SlipBehavior.cs
- AccessDataSourceView.cs
- SafePointer.cs
- WindowHelperService.cs
- _LocalDataStoreMgr.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- IPPacketInformation.cs
- XsdValidatingReader.cs
- TraceXPathNavigator.cs
- PngBitmapDecoder.cs
- SBCSCodePageEncoding.cs
- CollectionViewGroupInternal.cs
- GridViewDeletedEventArgs.cs
- Deserializer.cs
- MetadataArtifactLoader.cs
- EnvelopedPkcs7.cs
- AssociationSetMetadata.cs
- ScrollBarRenderer.cs
- SafeNativeMemoryHandle.cs
- ProfileService.cs
- METAHEADER.cs
- ViewValidator.cs
- Literal.cs
- XmlEncodedRawTextWriter.cs
- EntityModelSchemaGenerator.cs
- ForwardPositionQuery.cs
- StreamReader.cs
- CssClassPropertyAttribute.cs
- NavigationPropertySingletonExpression.cs
- StatementContext.cs
- ImmutableObjectAttribute.cs
- RichTextBoxAutomationPeer.cs
- QilInvokeEarlyBound.cs
- IChannel.cs
- GlobalizationAssembly.cs
- PeerDuplexChannelListener.cs
- WorkflowMarkupElementEventArgs.cs
- PageRequestManager.cs
- ListItemCollection.cs
- TextTreeDeleteContentUndoUnit.cs
- InfoCardSymmetricCrypto.cs
- XmlDataSourceView.cs
- MimeParameterWriter.cs
- GlobalEventManager.cs
- DataKeyArray.cs
- InkCanvasInnerCanvas.cs
- CodeNamespaceImport.cs
- RoleExceptions.cs
- CornerRadius.cs
- PageOutputQuality.cs
- LinearQuaternionKeyFrame.cs