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
- OperationFormatStyle.cs
- NativeMethods.cs
- PathFigure.cs
- WindowsToolbarItemAsMenuItem.cs
- WindowsAuthenticationEventArgs.cs
- LogicalCallContext.cs
- MD5Cng.cs
- CodeDirectiveCollection.cs
- TemplateContainer.cs
- Dictionary.cs
- AppSettingsReader.cs
- IdnElement.cs
- NumericUpDown.cs
- MenuItemStyle.cs
- TextEditorSelection.cs
- DropShadowEffect.cs
- Encoding.cs
- ProfileSection.cs
- IPipelineRuntime.cs
- ThreadStateException.cs
- MsmqIntegrationInputChannel.cs
- InputProviderSite.cs
- ReturnValue.cs
- TypedElement.cs
- SiteMapNodeCollection.cs
- ResourceExpression.cs
- MarginsConverter.cs
- Message.cs
- ExeContext.cs
- WebPartChrome.cs
- EdmToObjectNamespaceMap.cs
- KeyConverter.cs
- DocumentSequenceHighlightLayer.cs
- MemoryRecordBuffer.cs
- BitmapEffectGroup.cs
- KeyGestureConverter.cs
- ChangePasswordAutoFormat.cs
- ConsoleKeyInfo.cs
- SqlTriggerAttribute.cs
- RelationshipEndCollection.cs
- PhotoPrintingIntent.cs
- Visitors.cs
- X509Utils.cs
- MediaPlayer.cs
- HttpListenerException.cs
- PageCache.cs
- FederatedMessageSecurityOverHttpElement.cs
- TagNameToTypeMapper.cs
- SpellerError.cs
- DataGridViewRowEventArgs.cs
- LinqExpressionNormalizer.cs
- WindowsComboBox.cs
- XNodeValidator.cs
- SapiGrammar.cs
- SelectionRangeConverter.cs
- PageOutputQuality.cs
- NeutralResourcesLanguageAttribute.cs
- ConnectivityStatus.cs
- TimeZone.cs
- GenericTextProperties.cs
- Preprocessor.cs
- ISAPIWorkerRequest.cs
- SignatureToken.cs
- UInt64Converter.cs
- PropertyInformation.cs
- TextDecorationCollectionConverter.cs
- Privilege.cs
- ListViewEditEventArgs.cs
- Quad.cs
- CodeAttributeArgumentCollection.cs
- ParameterToken.cs
- SqlVisitor.cs
- HtmlButton.cs
- Int32RectConverter.cs
- ApplicationDirectory.cs
- DataControlFieldHeaderCell.cs
- Selection.cs
- PenLineJoinValidation.cs
- DefaultTextStoreTextComposition.cs
- DispatcherSynchronizationContext.cs
- Scheduling.cs
- AccessDataSource.cs
- HttpDebugHandler.cs
- ImageSource.cs
- SHA384Managed.cs
- SiteMapNodeItem.cs
- FunctionParameter.cs
- RequestCachePolicy.cs
- CollectionBuilder.cs
- XslTransform.cs
- EllipseGeometry.cs
- UnsignedPublishLicense.cs
- WindowsListBox.cs
- UIElementParaClient.cs
- _Semaphore.cs
- UIElement3DAutomationPeer.cs
- MailMessage.cs
- AuthenticateEventArgs.cs
- Odbc32.cs
- BinaryObjectReader.cs