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
- SecurityDescriptor.cs
- RawTextInputReport.cs
- DbFunctionCommandTree.cs
- BlockUIContainer.cs
- EditorZoneBase.cs
- TextAction.cs
- StreamWriter.cs
- ContourSegment.cs
- ToolBarButtonDesigner.cs
- CreateRefExpr.cs
- KeyConstraint.cs
- XsltInput.cs
- ColorConverter.cs
- SrgsToken.cs
- MouseGesture.cs
- TimelineGroup.cs
- ListSourceHelper.cs
- PeerApplicationLaunchInfo.cs
- Border.cs
- LiteralControl.cs
- XmlObjectSerializerContext.cs
- AnimatedTypeHelpers.cs
- PbrsForward.cs
- Tile.cs
- NativeMethods.cs
- CacheEntry.cs
- EastAsianLunisolarCalendar.cs
- RandomNumberGenerator.cs
- XmlDataSource.cs
- TraceHwndHost.cs
- HttpRequest.cs
- DispatcherEventArgs.cs
- SerializationObjectManager.cs
- ConfigurationSectionGroup.cs
- ExtractedStateEntry.cs
- Binding.cs
- PageAsyncTask.cs
- ComboBoxItem.cs
- PropertyEmitter.cs
- XsdValidatingReader.cs
- PatternMatcher.cs
- NameValueCollection.cs
- GeneralTransform3D.cs
- WindowsFormsSectionHandler.cs
- ReceiveActivityDesigner.cs
- MoveSizeWinEventHandler.cs
- FieldTemplateUserControl.cs
- safelinkcollection.cs
- ValidationSummary.cs
- BulletDecorator.cs
- RuntimeConfigurationRecord.cs
- DataTableTypeConverter.cs
- WorkflowDebuggerSteppingAttribute.cs
- TextSegment.cs
- TraceUtils.cs
- CounterSample.cs
- unitconverter.cs
- Marshal.cs
- XmlText.cs
- WpfKnownTypeInvoker.cs
- SqlDataRecord.cs
- TabItem.cs
- RightsManagementEncryptionTransform.cs
- CurrencyManager.cs
- SqlCaseSimplifier.cs
- HealthMonitoringSectionHelper.cs
- RegexEditorDialog.cs
- SettingsContext.cs
- RowsCopiedEventArgs.cs
- KeyedCollection.cs
- TextEvent.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- CoreSwitches.cs
- GridViewRowPresenterBase.cs
- FileSystemWatcher.cs
- UpdateManifestForBrowserApplication.cs
- SqlServer2KCompatibilityCheck.cs
- Keywords.cs
- ToolBarOverflowPanel.cs
- EncoderParameters.cs
- UserCancellationException.cs
- PostBackTrigger.cs
- SystemTcpConnection.cs
- ParallelTimeline.cs
- BinaryEditor.cs
- EventLogPermission.cs
- GridItem.cs
- PriorityBinding.cs
- XmlCharacterData.cs
- IODescriptionAttribute.cs
- ViewUtilities.cs
- HostedImpersonationContext.cs
- SizeF.cs
- IDQuery.cs
- VersionedStreamOwner.cs
- FrameworkPropertyMetadata.cs
- CreationContext.cs
- Stream.cs
- Adorner.cs
- UnknownWrapper.cs