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 / RichTextBoxAutomationPeer.cs / 1 / RichTextBoxAutomationPeer.cs
using System; 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.Documents; using System.Windows.Interop; using System.Windows.Media; using MS.Internal.Documents; using MS.Internal; using MS.Win32; namespace System.Windows.Automation.Peers { /// public class RichTextBoxAutomationPeer : TextAutomationPeer { /// public RichTextBoxAutomationPeer(RichTextBox owner): base(owner) {} /// override protected string GetClassNameCore() { return "RichTextBox"; } /// override protected AutomationControlType GetAutomationControlTypeCore() { return AutomationControlType.Document; } /// override public object GetPattern(PatternInterface patternInterface) { object returnValue = null; RichTextBox owner = (RichTextBox)Owner; if (patternInterface == PatternInterface.Text) { returnValue = new MS.Internal.Automation.TextAdaptor(this, owner.TextContainer); } if (patternInterface == PatternInterface.Scroll) { if (owner.ScrollViewer != null) { returnValue = owner.ScrollViewer.CreateAutomationPeer(); ((AutomationPeer)returnValue).EventsSource = this; } } return returnValue; } ////// protected override List/// GetChildrenCore() { RichTextBox owner = (RichTextBox)Owner; return TextContainerHelper.GetAutomationPeersFromRange(owner.TextContainer.Start, owner.TextContainer.End, null); } /// /// Gets collection of AutomationPeers for given text range. /// internal override ListGetAutomationPeersFromRange(ITextPointer start, ITextPointer end) { // Force children connection to automation tree. GetChildren(); RichTextBox owner = (RichTextBox)Owner; return TextContainerHelper.GetAutomationPeersFromRange(start, end, owner.TextContainer.Start); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. using System; 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.Documents; using System.Windows.Interop; using System.Windows.Media; using MS.Internal.Documents; using MS.Internal; using MS.Win32; namespace System.Windows.Automation.Peers { /// public class RichTextBoxAutomationPeer : TextAutomationPeer { /// public RichTextBoxAutomationPeer(RichTextBox owner): base(owner) {} /// override protected string GetClassNameCore() { return "RichTextBox"; } /// override protected AutomationControlType GetAutomationControlTypeCore() { return AutomationControlType.Document; } /// override public object GetPattern(PatternInterface patternInterface) { object returnValue = null; RichTextBox owner = (RichTextBox)Owner; if (patternInterface == PatternInterface.Text) { returnValue = new MS.Internal.Automation.TextAdaptor(this, owner.TextContainer); } if (patternInterface == PatternInterface.Scroll) { if (owner.ScrollViewer != null) { returnValue = owner.ScrollViewer.CreateAutomationPeer(); ((AutomationPeer)returnValue).EventsSource = this; } } return returnValue; } /// /// protected override List/// GetChildrenCore() { RichTextBox owner = (RichTextBox)Owner; return TextContainerHelper.GetAutomationPeersFromRange(owner.TextContainer.Start, owner.TextContainer.End, null); } /// /// Gets collection of AutomationPeers for given text range. /// internal override ListGetAutomationPeersFromRange(ITextPointer start, ITextPointer end) { // Force children connection to automation tree. GetChildren(); RichTextBox owner = (RichTextBox)Owner; return TextContainerHelper.GetAutomationPeersFromRange(start, end, owner.TextContainer.Start); } } } // 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
- CalloutQueueItem.cs
- SvcMapFileSerializer.cs
- SqlBulkCopy.cs
- XamlRtfConverter.cs
- MimeReturn.cs
- CryptoHandle.cs
- TypeNameParser.cs
- LayoutEvent.cs
- CustomErrorsSection.cs
- PolyLineSegmentFigureLogic.cs
- XmlValidatingReader.cs
- SelectedPathEditor.cs
- _ListenerRequestStream.cs
- PagesChangedEventArgs.cs
- NameSpaceExtractor.cs
- Completion.cs
- ZipPackagePart.cs
- SyndicationSerializer.cs
- PerformanceCounterManager.cs
- ICspAsymmetricAlgorithm.cs
- SourceChangedEventArgs.cs
- ProfileParameter.cs
- ChainOfResponsibility.cs
- WebPartChrome.cs
- C14NUtil.cs
- DeferredSelectedIndexReference.cs
- WindowsNonControl.cs
- OptimizerPatterns.cs
- DependencyPropertyChangedEventArgs.cs
- MatrixTransform.cs
- HtmlGenericControl.cs
- DataTableMappingCollection.cs
- SimpleNameService.cs
- InternalControlCollection.cs
- TextRangeProviderWrapper.cs
- QueryOperatorEnumerator.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- RadioButtonPopupAdapter.cs
- XmlSchemaExternal.cs
- PrinterUnitConvert.cs
- PeerToPeerException.cs
- Application.cs
- UInt32Converter.cs
- HttpModuleActionCollection.cs
- KeyGesture.cs
- HostingEnvironmentWrapper.cs
- WinFormsUtils.cs
- ComplexTypeEmitter.cs
- AsynchronousChannel.cs
- TimeZone.cs
- Activity.cs
- CodeTypeParameterCollection.cs
- ObservableDictionary.cs
- ReadOnlyDictionary.cs
- EmptyStringExpandableObjectConverter.cs
- ScalarType.cs
- TerminateSequenceResponse.cs
- Margins.cs
- PerformanceCounterPermissionEntry.cs
- RequestCache.cs
- CapacityStreamGeometryContext.cs
- ResponseBodyWriter.cs
- WindowsToolbarItemAsMenuItem.cs
- HebrewCalendar.cs
- DebugView.cs
- SQLDecimalStorage.cs
- DataServiceConfiguration.cs
- URI.cs
- SetIterators.cs
- XmlSchemaFacet.cs
- BStrWrapper.cs
- EditingMode.cs
- ViewCellRelation.cs
- AspNetHostingPermission.cs
- Content.cs
- XPathSelectionIterator.cs
- Timer.cs
- BlurBitmapEffect.cs
- UrlAuthorizationModule.cs
- BindingWorker.cs
- ProviderUtil.cs
- VerticalAlignConverter.cs
- DataObjectEventArgs.cs
- FontDialog.cs
- NodeFunctions.cs
- MenuItemStyleCollectionEditor.cs
- BoundsDrawingContextWalker.cs
- SslSecurityTokenParameters.cs
- BoundingRectTracker.cs
- EditorAttribute.cs
- TypeUnloadedException.cs
- TimersDescriptionAttribute.cs
- SingleAnimationBase.cs
- FaultContractInfo.cs
- XhtmlBasicLiteralTextAdapter.cs
- SaveFileDialog.cs
- FontStyles.cs
- BitmapVisualManager.cs
- COM2PictureConverter.cs
- Stack.cs