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
- WindowsSlider.cs
- GridViewRowEventArgs.cs
- Image.cs
- UserPreferenceChangingEventArgs.cs
- Msmq4PoisonHandler.cs
- SubMenuStyle.cs
- RightsManagementSuppressedStream.cs
- ClientType.cs
- DbConnectionPoolGroupProviderInfo.cs
- FloaterParagraph.cs
- MultiAsyncResult.cs
- VBCodeProvider.cs
- DefaultBindingPropertyAttribute.cs
- NativeMethodsOther.cs
- ToolStripOverflowButton.cs
- PanningMessageFilter.cs
- DocumentOrderQuery.cs
- XMLDiffLoader.cs
- TaskCanceledException.cs
- Int32.cs
- Part.cs
- FileClassifier.cs
- IPAddress.cs
- TableRowCollection.cs
- CompiledQuery.cs
- PersistStreamTypeWrapper.cs
- BitmapEffectvisualstate.cs
- RichTextBoxContextMenu.cs
- ObjectDataSourceStatusEventArgs.cs
- UserControl.cs
- BasicCommandTreeVisitor.cs
- ReturnType.cs
- ApplicationContext.cs
- Point3DIndependentAnimationStorage.cs
- BaseInfoTable.cs
- Attributes.cs
- HMACSHA512.cs
- DoubleAnimationBase.cs
- InstanceData.cs
- hresults.cs
- ConfigXmlText.cs
- CustomErrorsSectionWrapper.cs
- MatrixTransform3D.cs
- DataGridViewComboBoxColumn.cs
- ButtonField.cs
- RoutedUICommand.cs
- FormClosingEvent.cs
- SpStreamWrapper.cs
- ColumnHeader.cs
- ZipIOLocalFileBlock.cs
- UIntPtr.cs
- CopyNodeSetAction.cs
- DataGridViewCellMouseEventArgs.cs
- CheckBoxField.cs
- SerializationInfoEnumerator.cs
- EditorPart.cs
- EntityTypeEmitter.cs
- ListParagraph.cs
- ImagingCache.cs
- SqlDataSourceView.cs
- RepeaterCommandEventArgs.cs
- DebugHandleTracker.cs
- CustomPopupPlacement.cs
- PackageDigitalSignatureManager.cs
- DocumentPageHost.cs
- AppDomainAttributes.cs
- AsyncCompletedEventArgs.cs
- PolicyValidationException.cs
- SkipQueryOptionExpression.cs
- XamlVector3DCollectionSerializer.cs
- IISUnsafeMethods.cs
- CustomErrorCollection.cs
- SmtpFailedRecipientsException.cs
- XmlNamespaceMappingCollection.cs
- ChangeDirector.cs
- RoleService.cs
- TextOnlyOutput.cs
- ProviderConnectionPointCollection.cs
- TransformerInfoCollection.cs
- Utils.cs
- DesignerFrame.cs
- WebPartConnectionsDisconnectVerb.cs
- EmptyEnumerable.cs
- ISessionStateStore.cs
- AnnotationService.cs
- Geometry.cs
- VideoDrawing.cs
- HttpValueCollection.cs
- OciEnlistContext.cs
- FormattedTextSymbols.cs
- ImageSourceValueSerializer.cs
- RelationshipEnd.cs
- FormViewRow.cs
- DataGridViewColumnCollection.cs
- WmpBitmapEncoder.cs
- DynamicILGenerator.cs
- GridItemCollection.cs
- RequestCachePolicy.cs
- SubqueryRules.cs
- ToolStripDropDownButton.cs