Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- XappLauncher.cs
- DocumentPage.cs
- CollectionConverter.cs
- MetaModel.cs
- RecoverInstanceLocksCommand.cs
- Package.cs
- IndexObject.cs
- DataGridViewLayoutData.cs
- DataGridViewCellValidatingEventArgs.cs
- TypedCompletedAsyncResult.cs
- DoubleCollection.cs
- Line.cs
- GlyphRunDrawing.cs
- CaseKeyBox.xaml.cs
- PowerStatus.cs
- TextStore.cs
- GridErrorDlg.cs
- SafeNativeMethods.cs
- UIHelper.cs
- Lasso.cs
- TypedTableBase.cs
- InfoCardRSAOAEPKeyExchangeFormatter.cs
- SiteOfOriginPart.cs
- CommandDevice.cs
- SessionEndedEventArgs.cs
- UserControlBuildProvider.cs
- SamlAssertionKeyIdentifierClause.cs
- ServiceOperationListItem.cs
- DataColumnMapping.cs
- SystemNetHelpers.cs
- CultureTable.cs
- XmlParserContext.cs
- TextRenderer.cs
- ToolStripSeparator.cs
- Button.cs
- SessionStateItemCollection.cs
- CodeGen.cs
- AutoGeneratedFieldProperties.cs
- ThreadAbortException.cs
- ImplicitInputBrush.cs
- ConfigsHelper.cs
- AssemblyHash.cs
- ObjectPersistData.cs
- CreateUserWizardStep.cs
- ConvertBinder.cs
- AsymmetricAlgorithm.cs
- TransactionManager.cs
- AddInContractAttribute.cs
- ScriptManagerProxy.cs
- WebPartTransformer.cs
- LogicalTreeHelper.cs
- SpellerInterop.cs
- DockPanel.cs
- AssociatedControlConverter.cs
- UpdateProgress.cs
- FormsAuthenticationConfiguration.cs
- PropertyItemInternal.cs
- PlaceHolder.cs
- HyperLinkField.cs
- KnownColorTable.cs
- RegisteredExpandoAttribute.cs
- ListItemConverter.cs
- PaginationProgressEventArgs.cs
- __Error.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- Base64Decoder.cs
- OdbcCommandBuilder.cs
- TreeWalker.cs
- VisualStyleInformation.cs
- XsltConvert.cs
- OutputCacheSection.cs
- CookielessData.cs
- MenuCommand.cs
- XPathNavigator.cs
- XPathBinder.cs
- MultipartContentParser.cs
- ValidationErrorCollection.cs
- UnknownMessageReceivedEventArgs.cs
- NamedPermissionSet.cs
- DataGridViewTopLeftHeaderCell.cs
- CompiledQuery.cs
- Stream.cs
- AdCreatedEventArgs.cs
- TimelineGroup.cs
- _HTTPDateParse.cs
- Slider.cs
- XmlQuerySequence.cs
- EncodingFallbackAwareXmlTextWriter.cs
- DataSourceCacheDurationConverter.cs
- Globals.cs
- BypassElement.cs
- SqlColumnizer.cs
- TaskScheduler.cs
- WebPartCatalogAddVerb.cs
- ServiceChannel.cs
- Pointer.cs
- DropDownList.cs
- QuaternionRotation3D.cs
- MDIClient.cs
- ByteKeyFrameCollection.cs