Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Automation / Peers / DocumentViewerAutomationPeer.cs / 1305600 / 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
- ThemeDictionaryExtension.cs
- FixedPage.cs
- Stackframe.cs
- OrderingExpression.cs
- ButtonRenderer.cs
- SharedConnectionInfo.cs
- CqlIdentifiers.cs
- EDesignUtil.cs
- OdbcPermission.cs
- StreamWithDictionary.cs
- WebPartConnectionsDisconnectVerb.cs
- DesignerLoader.cs
- CrossSiteScriptingValidation.cs
- ResolveCriteria.cs
- ItemCheckEvent.cs
- RC2.cs
- QilTypeChecker.cs
- DataGridViewAutoSizeColumnsModeEventArgs.cs
- ArgumentException.cs
- Lasso.cs
- OdbcUtils.cs
- InheritanceAttribute.cs
- ListItemsPage.cs
- RequestCache.cs
- AttachInfo.cs
- XamlWriter.cs
- ToolStripTextBox.cs
- HotSpotCollection.cs
- ResXFileRef.cs
- EntitySqlQueryCacheEntry.cs
- BitmapPalette.cs
- _HeaderInfoTable.cs
- EntityDataReader.cs
- IntellisenseTextBox.designer.cs
- MetadataArtifactLoaderResource.cs
- IFlowDocumentViewer.cs
- CurrencyManager.cs
- OutOfMemoryException.cs
- DigitShape.cs
- QilFactory.cs
- DescendantOverDescendantQuery.cs
- CipherData.cs
- PageEventArgs.cs
- HtmlGenericControl.cs
- DBConcurrencyException.cs
- StylusPointDescription.cs
- CancellationHandler.cs
- WinEventWrap.cs
- QuaternionValueSerializer.cs
- ExpressionDumper.cs
- Claim.cs
- DataGridViewMethods.cs
- FormView.cs
- KerberosReceiverSecurityToken.cs
- RemoteX509Token.cs
- LocalFileSettingsProvider.cs
- SByteStorage.cs
- ShaperBuffers.cs
- WebPartTransformerCollection.cs
- FileLogRecordStream.cs
- PageContent.cs
- TypeConverter.cs
- XmlWrappingReader.cs
- Array.cs
- AppSettingsExpressionBuilder.cs
- Literal.cs
- TextTreeNode.cs
- Expander.cs
- ConfigXmlElement.cs
- TimeSpanParse.cs
- QueryCacheManager.cs
- WindowShowOrOpenTracker.cs
- QilLoop.cs
- SliderAutomationPeer.cs
- UdpSocket.cs
- ObjectDataSourceMethodEventArgs.cs
- WindowInteractionStateTracker.cs
- BitmapEffectInput.cs
- BasicExpressionVisitor.cs
- QuadraticBezierSegment.cs
- UIntPtr.cs
- ImageCodecInfo.cs
- JpegBitmapDecoder.cs
- FragmentQueryKB.cs
- LoginUtil.cs
- TrackingProfileSerializer.cs
- StringSorter.cs
- SqlInternalConnectionTds.cs
- SecurityToken.cs
- PropertyConverter.cs
- EdmValidator.cs
- CursorInteropHelper.cs
- Point3D.cs
- Stylesheet.cs
- RijndaelManagedTransform.cs
- ObjectComplexPropertyMapping.cs
- MimeReflector.cs
- Emitter.cs
- TaskFileService.cs
- SynchronizationContextHelper.cs