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
- XamlTreeBuilderBamlRecordWriter.cs
- SelectionItemPattern.cs
- PropertyHelper.cs
- SQLByte.cs
- InstanceDescriptor.cs
- SoapAttributeAttribute.cs
- LineServices.cs
- CurrencyManager.cs
- UIElement.cs
- StateChangeEvent.cs
- AffineTransform3D.cs
- InstanceDataCollectionCollection.cs
- NullRuntimeConfig.cs
- AdapterDictionary.cs
- XmlAggregates.cs
- ComboBoxRenderer.cs
- CrossSiteScriptingValidation.cs
- ButtonField.cs
- Timer.cs
- StylusCollection.cs
- ScrollChrome.cs
- _WinHttpWebProxyDataBuilder.cs
- TextBreakpoint.cs
- DelegatingConfigHost.cs
- PersistenceTypeAttribute.cs
- UserControlAutomationPeer.cs
- HttpCapabilitiesEvaluator.cs
- SocketCache.cs
- ActivityDesignerAccessibleObject.cs
- PanelStyle.cs
- XsltException.cs
- PolyLineSegment.cs
- ColorKeyFrameCollection.cs
- Metafile.cs
- PermissionSetTriple.cs
- SafeNativeMethods.cs
- WorkflowQueueInfo.cs
- glyphs.cs
- CursorInteropHelper.cs
- IndentedWriter.cs
- ToolStripCustomTypeDescriptor.cs
- ComponentEditorPage.cs
- XsltQilFactory.cs
- XmlAttribute.cs
- DecodeHelper.cs
- UpdatableWrapper.cs
- GraphicsContext.cs
- QueryExpr.cs
- FlowDocumentPaginator.cs
- DecoderFallbackWithFailureFlag.cs
- UserCancellationException.cs
- CheckBox.cs
- FontFamilyConverter.cs
- ProfileServiceManager.cs
- SqlError.cs
- SafeHandle.cs
- MetadataItemEmitter.cs
- XPathDocumentIterator.cs
- CodeMemberEvent.cs
- ProvidePropertyAttribute.cs
- SpecialNameAttribute.cs
- EventEntry.cs
- PointUtil.cs
- ChannelParameterCollection.cs
- IdleTimeoutMonitor.cs
- SemanticResolver.cs
- Bitmap.cs
- InvokeWebServiceDesigner.cs
- UnknownExceptionActionHelper.cs
- EUCJPEncoding.cs
- SqlDeflator.cs
- DbProviderFactories.cs
- DataGridViewRowCancelEventArgs.cs
- ExceptionUtility.cs
- WorkBatch.cs
- DataSourceSelectArguments.cs
- XmlTextEncoder.cs
- DateTimeFormat.cs
- GeneralTransformGroup.cs
- DesignerView.cs
- ProfileGroupSettings.cs
- TextViewElement.cs
- DmlSqlGenerator.cs
- BindingContext.cs
- HiddenFieldPageStatePersister.cs
- MergeFilterQuery.cs
- ListBoxItem.cs
- UmAlQuraCalendar.cs
- VisualStyleRenderer.cs
- ActiveXHost.cs
- AlternationConverter.cs
- ProviderException.cs
- CheckBoxFlatAdapter.cs
- ListViewInsertionMark.cs
- SignatureDescription.cs
- AuthenticationModuleElement.cs
- __ComObject.cs
- HandledMouseEvent.cs
- PlaceHolder.cs
- DirectoryInfo.cs