Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / MS / Internal / PtsHost / DirtyTextRange.cs / 1305600 / DirtyTextRange.cs
//---------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // // File: DirtyTextRange.cs // // Description: Dirty text range describes change in the TextContainer. // // History: // 06/06/2003 : [....] - created. // //--------------------------------------------------------------------------- using System; using System.Windows.Controls; using System.Windows.Documents; namespace MS.Internal.PtsHost { // --------------------------------------------------------------------- // Dirty text range describes change in the TextContainer. // --------------------------------------------------------------------- internal struct DirtyTextRange { // ------------------------------------------------------------------ // Constructor // // startIndex - Index of the starting position of the change. // positionsAdded - Number of characters added. // positionsRemoved - Number of characters removed. // ----------------------------------------------------------------- internal DirtyTextRange(int startIndex, int positionsAdded, int positionsRemoved) { StartIndex = startIndex; PositionsAdded = positionsAdded; PositionsRemoved = positionsRemoved; } // ------------------------------------------------------------------ // Constructor // // change - TextContainer change data. // ------------------------------------------------------------------ internal DirtyTextRange(TextContainerChangeEventArgs change) { StartIndex = change.ITextPosition.Offset; PositionsAdded = 0; PositionsRemoved = 0; switch (change.TextChange) { case TextChangeType.ContentAdded: PositionsAdded = change.Count; break; case TextChangeType.ContentRemoved: PositionsRemoved = change.Count; break; case TextChangeType.PropertyModified: PositionsAdded = change.Count; PositionsRemoved = change.Count; break; } } // ----------------------------------------------------------------- // Index of the starting position of the change. // ------------------------------------------------------------------ internal int StartIndex; // ----------------------------------------------------------------- // Number of characters added. // ----------------------------------------------------------------- internal int PositionsAdded; // ----------------------------------------------------------------- // Number of characters removed. // ------------------------------------------------------------------ internal int PositionsRemoved; } } // 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
- ItemMap.cs
- EditingCoordinator.cs
- PageThemeBuildProvider.cs
- AssociationTypeEmitter.cs
- CheckBox.cs
- ImpersonationContext.cs
- OleServicesContext.cs
- TypeName.cs
- DbConnectionStringCommon.cs
- RectangleF.cs
- CompiledAction.cs
- DbConnectionPoolIdentity.cs
- WebHttpSecurity.cs
- TemplatedMailWebEventProvider.cs
- SqlDataSourceFilteringEventArgs.cs
- MetadataAssemblyHelper.cs
- CodeTypeReference.cs
- SqlConnection.cs
- DetailsViewDeleteEventArgs.cs
- IntSecurity.cs
- Int32Converter.cs
- cache.cs
- Activity.cs
- VariableQuery.cs
- PrivateFontCollection.cs
- MobileControlPersister.cs
- DbRetry.cs
- DataGridViewCellValidatingEventArgs.cs
- cryptoapiTransform.cs
- DragEvent.cs
- dsa.cs
- MediaCommands.cs
- ConfigurationStrings.cs
- InputChannelAcceptor.cs
- InstanceCreationEditor.cs
- RightsManagementEncryptionTransform.cs
- COM2Enum.cs
- _NegotiateClient.cs
- PrinterUnitConvert.cs
- XmlNamespaceDeclarationsAttribute.cs
- XmlBaseWriter.cs
- RoutedPropertyChangedEventArgs.cs
- StateMachine.cs
- GridViewUpdateEventArgs.cs
- KeyEvent.cs
- ChtmlPhoneCallAdapter.cs
- Item.cs
- UserPreferenceChangedEventArgs.cs
- EndPoint.cs
- NameValueFileSectionHandler.cs
- MediaScriptCommandRoutedEventArgs.cs
- PropertyTabAttribute.cs
- SafeArchiveContext.cs
- ConnectionPoint.cs
- ExpressionBinding.cs
- ExtenderHelpers.cs
- ResetableIterator.cs
- LongValidator.cs
- MemoryFailPoint.cs
- SystemColors.cs
- BrowserCapabilitiesFactoryBase.cs
- PrintController.cs
- HtmlTableRowCollection.cs
- documentation.cs
- ItemsPresenter.cs
- FixedMaxHeap.cs
- ValidationHelper.cs
- ImpersonationContext.cs
- Vector3dCollection.cs
- ChangeProcessor.cs
- PropertyTabChangedEvent.cs
- UserControlCodeDomTreeGenerator.cs
- StringStorage.cs
- SourceFileBuildProvider.cs
- TreeNodeCollection.cs
- View.cs
- GroupItemAutomationPeer.cs
- RealProxy.cs
- TextTreeNode.cs
- ChannelManager.cs
- SignatureHelper.cs
- ProcessRequestArgs.cs
- ClosureBinding.cs
- ReflectionHelper.cs
- EnumerableRowCollectionExtensions.cs
- Application.cs
- COAUTHIDENTITY.cs
- HeaderUtility.cs
- serverconfig.cs
- ObjectAnimationUsingKeyFrames.cs
- Int16.cs
- KeyboardEventArgs.cs
- Control.cs
- ConnectionPoint.cs
- ValidatedControlConverter.cs
- ToolStripControlHost.cs
- RegistryConfigurationProvider.cs
- IIS7UserPrincipal.cs
- FontStyle.cs
- XmlSerializableServices.cs