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
- OwnerDrawPropertyBag.cs
- ContextCorrelationInitializer.cs
- AndCondition.cs
- MarkupExtensionParser.cs
- QilTernary.cs
- DefaultAsyncDataDispatcher.cs
- SiteMapSection.cs
- TypeResolver.cs
- UnsafeNativeMethodsCLR.cs
- XsdDateTime.cs
- RegularExpressionValidator.cs
- Latin1Encoding.cs
- ITreeGenerator.cs
- AttributedMetaModel.cs
- CompositeKey.cs
- RectangleF.cs
- CompilerGeneratedAttribute.cs
- AnnotationResourceChangedEventArgs.cs
- IntSecurity.cs
- CodeAttributeDeclarationCollection.cs
- GenericFlowSwitchHelper.cs
- ApplicationId.cs
- ThousandthOfEmRealDoubles.cs
- LinearGradientBrush.cs
- WindowsImpersonationContext.cs
- LedgerEntry.cs
- HwndStylusInputProvider.cs
- OrderedDictionary.cs
- LogLogRecord.cs
- QilLoop.cs
- DependencyPropertyConverter.cs
- ActivityCodeDomReferenceService.cs
- CategoryValueConverter.cs
- IndexedGlyphRun.cs
- LambdaSerializationException.cs
- EntitySet.cs
- BitStream.cs
- LocalizabilityAttribute.cs
- CompositeFontFamily.cs
- BindUriHelper.cs
- StatusBarAutomationPeer.cs
- SqlDataSourceAdvancedOptionsForm.cs
- UrlPath.cs
- UriTemplateVariableQueryValue.cs
- OleStrCAMarshaler.cs
- ProcessThreadCollection.cs
- DataFormats.cs
- DataTrigger.cs
- XmlMembersMapping.cs
- TransformedBitmap.cs
- SimpleTypeResolver.cs
- ToolStripDropDownItem.cs
- BeginStoryboard.cs
- MailBnfHelper.cs
- MdiWindowListItemConverter.cs
- SerializationFieldInfo.cs
- CrossSiteScriptingValidation.cs
- GuidelineSet.cs
- RouteParameter.cs
- MethodSet.cs
- MetadataCacheItem.cs
- TableAutomationPeer.cs
- SR.cs
- Site.cs
- WindowsFormsSectionHandler.cs
- OperatingSystem.cs
- TypedTableBaseExtensions.cs
- DataGridClipboardCellContent.cs
- TemplateBindingExpression.cs
- LockCookie.cs
- MessageSecurityVersionConverter.cs
- DataServiceQueryContinuation.cs
- MsmqTransportElement.cs
- RecipientInfo.cs
- IDispatchConstantAttribute.cs
- DataGridViewBand.cs
- RegexReplacement.cs
- RangeValueProviderWrapper.cs
- FillBehavior.cs
- COM2TypeInfoProcessor.cs
- WebControlParameterProxy.cs
- SortQuery.cs
- ConfigXmlElement.cs
- StaticFileHandler.cs
- UserMapPath.cs
- Transform.cs
- ResourceProviderFactory.cs
- InitializerFacet.cs
- ObjectListGeneralPage.cs
- _ProxyChain.cs
- DependencyPropertyKind.cs
- CompositionTarget.cs
- ManagedWndProcTracker.cs
- WebPartDisplayModeCollection.cs
- UnsafeNativeMethods.cs
- CodeSnippetTypeMember.cs
- BuildProvidersCompiler.cs
- DrawTreeNodeEventArgs.cs
- CodeDelegateCreateExpression.cs
- XmlSecureResolver.cs