Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Framework / System / Windows / Automation / Peers / SelectorAutomationPeer.cs / 1 / SelectorAutomationPeer.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 abstract class SelectorAutomationPeer : ItemsControlAutomationPeer, ISelectionProvider { /// protected SelectorAutomationPeer(Selector owner): base(owner) {} /// override protected AutomationControlType GetAutomationControlTypeCore() { return AutomationControlType.List; } /// override public object GetPattern(PatternInterface patternInterface) { if(patternInterface == PatternInterface.Selection) { return this; } return base.GetPattern(patternInterface); // ItemsControlAutomationPeer support Scroll pattern } //-------------------------------------------------------------------- // // ISelectionProvider // //------------------------------------------------------------------- #region ISelectionProvider IRawElementProviderSimple [] ISelectionProvider.GetSelection() { Selector owner = (Selector)Owner; int count = owner._selectedItems.Count; if(count > 0 && ItemPeers.Count > 0) { ListselectedProviders = new List (count); for(int i=0; i AutomationInteropProvider.InvalidateLimit) { this.RaiseAutomationEvent(AutomationEvents.SelectionPatternOnInvalidated); } else { int i; for (i = 0; i < numAdded; i++) { SelectorItemAutomationPeer peer = (SelectorItemAutomationPeer)ItemPeers[e.AddedItems[i]]; if (peer != null) { peer.RaiseAutomationEvent(AutomationEvents.SelectionItemPatternOnElementAddedToSelection); } } for (i = 0; i < numRemoved; i++) { SelectorItemAutomationPeer peer = (SelectorItemAutomationPeer)ItemPeers[e.RemovedItems[i]]; if (peer != null) { peer.RaiseAutomationEvent(AutomationEvents.SelectionItemPatternOnElementRemovedFromSelection); } } } } } #endregion } } // 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
- CanonicalizationDriver.cs
- UnknownBitmapEncoder.cs
- StrongNameKeyPair.cs
- FacetValues.cs
- PageThemeBuildProvider.cs
- MsmqMessageProperty.cs
- DataGridViewCellLinkedList.cs
- GenericNameHandler.cs
- AncillaryOps.cs
- WebSysDescriptionAttribute.cs
- MessageLoggingFilterTraceRecord.cs
- QuaternionValueSerializer.cs
- MessageCredentialType.cs
- DocumentPageView.cs
- ParameterElement.cs
- MessageContractExporter.cs
- TextSpanModifier.cs
- NavigationFailedEventArgs.cs
- exports.cs
- BitmapEncoder.cs
- TextSimpleMarkerProperties.cs
- sqlstateclientmanager.cs
- RuleSetBrowserDialog.cs
- PrePrepareMethodAttribute.cs
- SingleSelectRootGridEntry.cs
- Int32.cs
- CodeGenHelper.cs
- DataObjectMethodAttribute.cs
- EnumerableWrapperWeakToStrong.cs
- ExtensibleClassFactory.cs
- Label.cs
- HtmlFormWrapper.cs
- AnimationClock.cs
- SamlDelegatingWriter.cs
- ProtocolElement.cs
- XmlAutoDetectWriter.cs
- ExplicitDiscriminatorMap.cs
- StorageEntityTypeMapping.cs
- ChildDocumentBlock.cs
- HotSpotCollection.cs
- DecoderReplacementFallback.cs
- LookupBindingPropertiesAttribute.cs
- TypeReference.cs
- Substitution.cs
- GridViewSortEventArgs.cs
- DataColumnPropertyDescriptor.cs
- ProcessInputEventArgs.cs
- CategoryEditor.cs
- TemplatedWizardStep.cs
- StatementContext.cs
- ConstrainedDataObject.cs
- MappingMetadataHelper.cs
- WebScriptServiceHost.cs
- HwndStylusInputProvider.cs
- PointAnimationUsingPath.cs
- ChannelDemuxer.cs
- WebBrowserNavigatingEventHandler.cs
- Rotation3D.cs
- ProgressChangedEventArgs.cs
- MethodBody.cs
- AmbientEnvironment.cs
- ActivityMarkupSerializationProvider.cs
- HtmlButton.cs
- XsltException.cs
- HMACSHA384.cs
- MessageBox.cs
- NameScopePropertyAttribute.cs
- MessageTraceRecord.cs
- Track.cs
- GrabHandleGlyph.cs
- TextEditorCopyPaste.cs
- PersistChildrenAttribute.cs
- PrintPageEvent.cs
- RegexFCD.cs
- XmlConvert.cs
- SqlConnectionStringBuilder.cs
- XhtmlBasicCommandAdapter.cs
- processwaithandle.cs
- XmlSchemaAny.cs
- XMLUtil.cs
- AssociationTypeEmitter.cs
- DataControlField.cs
- SafeProcessHandle.cs
- InternalDispatchObject.cs
- FlowDocumentFormatter.cs
- HierarchicalDataTemplate.cs
- XmlSchemaProviderAttribute.cs
- Control.cs
- InternalTypeHelper.cs
- SqlOuterApplyReducer.cs
- InputScopeAttribute.cs
- FlowDocumentReaderAutomationPeer.cs
- WindowsServiceElement.cs
- Int16AnimationUsingKeyFrames.cs
- XmlSchemaAttribute.cs
- ListControl.cs
- HtmlInputHidden.cs
- CommonObjectSecurity.cs
- EntitySetDataBindingList.cs
- Crypto.cs