Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / wpf / src / Framework / System / Windows / Automation / Peers / DocumentViewerAutomationPeer.cs / 1 / DocumentViewerAutomationPeer.cs
using System; 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.Documents; using System.Windows.Interop; using System.Windows.Media; using MS.Internal; using MS.Win32; namespace System.Windows.Automation.Peers { ////// AutomationPeer associated with DocumentViewer /// public class DocumentViewerAutomationPeer : DocumentViewerBaseAutomationPeer { ////// Constructor /// /// Owner of the AutomationPeer. public DocumentViewerAutomationPeer(DocumentViewer owner) : base(owner) { } ////// override protected string GetClassNameCore() { return "DocumentViewer"; } ////// /// override public object GetPattern(PatternInterface patternInterface) { object returnValue = null; // Check if provided patternInterface is for Scroll, which is all // that is currently exposed. if (patternInterface == PatternInterface.Scroll) { // Get a reference to DocumentViewer's ScrollViewer DocumentViewer owner = (DocumentViewer)Owner; if (owner.ScrollViewer != null) { // Get a reference to ScrollViewer's AutomationPeer. AutomationPeer scrollPeer = UIElementAutomationPeer.CreatePeerForElement(owner.ScrollViewer); if (scrollPeer != null && scrollPeer is IScrollProvider) { scrollPeer.EventsSource = this; returnValue = scrollPeer; } } } else { returnValue = base.GetPattern(patternInterface); } return returnValue; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. using System; 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.Documents; using System.Windows.Interop; using System.Windows.Media; using MS.Internal; using MS.Win32; namespace System.Windows.Automation.Peers { ////// /// AutomationPeer associated with DocumentViewer /// public class DocumentViewerAutomationPeer : DocumentViewerBaseAutomationPeer { ////// Constructor /// /// Owner of the AutomationPeer. public DocumentViewerAutomationPeer(DocumentViewer owner) : base(owner) { } ////// override protected string GetClassNameCore() { return "DocumentViewer"; } ////// /// override public object GetPattern(PatternInterface patternInterface) { object returnValue = null; // Check if provided patternInterface is for Scroll, which is all // that is currently exposed. if (patternInterface == PatternInterface.Scroll) { // Get a reference to DocumentViewer's ScrollViewer DocumentViewer owner = (DocumentViewer)Owner; if (owner.ScrollViewer != null) { // Get a reference to ScrollViewer's AutomationPeer. AutomationPeer scrollPeer = UIElementAutomationPeer.CreatePeerForElement(owner.ScrollViewer); if (scrollPeer != null && scrollPeer is IScrollProvider) { scrollPeer.EventsSource = this; returnValue = scrollPeer; } } } else { returnValue = base.GetPattern(patternInterface); } return returnValue; } } } // 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
- IdentifierCollection.cs
- SqlDeflator.cs
- dsa.cs
- BindToObject.cs
- ElementAction.cs
- StringToken.cs
- ColorInterpolationModeValidation.cs
- FlowDocumentPaginator.cs
- UnknownBitmapEncoder.cs
- DrawingVisualDrawingContext.cs
- CheckedPointers.cs
- MailWebEventProvider.cs
- AutoSizeToolBoxItem.cs
- ExpressionList.cs
- Int64.cs
- ReflectionTypeLoadException.cs
- ThicknessAnimationUsingKeyFrames.cs
- XsdCachingReader.cs
- SqlInfoMessageEvent.cs
- JobCollate.cs
- WindowsToolbarAsMenu.cs
- SafePEFileHandle.cs
- EmptyCollection.cs
- QilName.cs
- ContentWrapperAttribute.cs
- CellNormalizer.cs
- CompilationAssemblyInstallComponent.cs
- BitmapEffectCollection.cs
- OlePropertyStructs.cs
- XmlEntity.cs
- DrawingServices.cs
- BufferModeSettings.cs
- PropertyBuilder.cs
- TimeSpanStorage.cs
- ObjectManager.cs
- OneWayBindingElementImporter.cs
- BuildProviderUtils.cs
- WindowsButton.cs
- RequestQueue.cs
- TextServicesDisplayAttribute.cs
- ImageFormatConverter.cs
- BCryptSafeHandles.cs
- LazyLoadBehavior.cs
- ExpandCollapseIsCheckedConverter.cs
- SingleResultAttribute.cs
- Aggregates.cs
- GridViewRowCollection.cs
- ToolboxItemWrapper.cs
- OverflowException.cs
- Activator.cs
- EntitySqlQueryCacheKey.cs
- PropertyReferenceSerializer.cs
- StorageAssociationSetMapping.cs
- MarkupCompilePass2.cs
- TextContainerChangeEventArgs.cs
- SdlChannelSink.cs
- FormatVersion.cs
- ProviderMetadata.cs
- TextEncodedRawTextWriter.cs
- RequestCachePolicyConverter.cs
- ToolStripContentPanelRenderEventArgs.cs
- CheckBoxStandardAdapter.cs
- PathGradientBrush.cs
- Misc.cs
- PermissionToken.cs
- DoubleLinkList.cs
- ArrangedElementCollection.cs
- BinaryMessageEncoder.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- TextPointerBase.cs
- EntityContainer.cs
- XPathSelectionIterator.cs
- FormCollection.cs
- PerformanceCounterNameAttribute.cs
- SymbolPair.cs
- DataGridHeaderBorder.cs
- WebBrowserPermission.cs
- WeakHashtable.cs
- EncoderParameters.cs
- TextEditorSelection.cs
- FloaterBaseParaClient.cs
- MapPathBasedVirtualPathProvider.cs
- SqlDataReaderSmi.cs
- DataSysAttribute.cs
- PropertyManager.cs
- TextTreeNode.cs
- MonthChangedEventArgs.cs
- _CommandStream.cs
- OptionalColumn.cs
- SecurityState.cs
- UIElementParagraph.cs
- EventsTab.cs
- BeginStoryboard.cs
- Base64Encoder.cs
- StringBuilder.cs
- Underline.cs
- ExternalCalls.cs
- UntrustedRecipientException.cs
- Item.cs
- DrawingBrush.cs