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
- ProfileSection.cs
- BamlLocalizableResourceKey.cs
- TransformPattern.cs
- WinEventHandler.cs
- DetailsViewPagerRow.cs
- HostedHttpContext.cs
- ConsumerConnectionPoint.cs
- Separator.cs
- XPathNodeInfoAtom.cs
- serverconfig.cs
- PresentationTraceSources.cs
- OdbcCommand.cs
- XmlNodeChangedEventArgs.cs
- XmlSchemaNotation.cs
- WebControl.cs
- SecurityUtils.cs
- ReflectionServiceProvider.cs
- SignerInfo.cs
- CanExecuteRoutedEventArgs.cs
- CodeSubDirectory.cs
- BaseDataBoundControl.cs
- AmbientLight.cs
- SqlConnectionFactory.cs
- FaultFormatter.cs
- SqlSupersetValidator.cs
- TabPanel.cs
- CommandField.cs
- MaskDescriptors.cs
- TabletCollection.cs
- CharAnimationBase.cs
- XmlSchemaProviderAttribute.cs
- AngleUtil.cs
- MexHttpsBindingElement.cs
- Path.cs
- RemotingConfiguration.cs
- XmlDataSourceDesigner.cs
- XmlSchemaSimpleTypeList.cs
- TextSelectionProcessor.cs
- XPathScanner.cs
- WaitHandleCannotBeOpenedException.cs
- ManualResetEvent.cs
- InkSerializer.cs
- RoleGroup.cs
- PolyBezierSegmentFigureLogic.cs
- EntitySet.cs
- MenuCommands.cs
- XmlNotation.cs
- FtpWebResponse.cs
- MetadataItemCollectionFactory.cs
- StreamingContext.cs
- DataGridViewTextBoxColumn.cs
- MimeWriter.cs
- EdmItemCollection.cs
- TypeUnloadedException.cs
- EventTask.cs
- DataSysAttribute.cs
- ResolveMatchesApril2005.cs
- SkewTransform.cs
- ToolStripContainerActionList.cs
- ResolvedKeyFrameEntry.cs
- AdapterUtil.cs
- ProcessHost.cs
- DiagnosticSection.cs
- GenericWebPart.cs
- dataobject.cs
- PointAnimation.cs
- UmAlQuraCalendar.cs
- CompensatableTransactionScopeActivity.cs
- WebPartVerbCollection.cs
- NamespaceTable.cs
- Menu.cs
- ViewPort3D.cs
- ToolStripDropDownItem.cs
- UpdatableWrapper.cs
- GiveFeedbackEventArgs.cs
- ClassHandlersStore.cs
- AffineTransform3D.cs
- DownloadProgressEventArgs.cs
- DataQuery.cs
- QuaternionAnimation.cs
- tooltip.cs
- ProfileParameter.cs
- ClientFormsAuthenticationMembershipProvider.cs
- Menu.cs
- SelectionPattern.cs
- hwndwrapper.cs
- MouseGesture.cs
- RoleManagerEventArgs.cs
- JobInputBins.cs
- PathNode.cs
- Blend.cs
- DataTableMappingCollection.cs
- SafeArrayRankMismatchException.cs
- XmlSchemaInferenceException.cs
- ItemCheckEvent.cs
- CurrencyWrapper.cs
- ObjectTypeMapping.cs
- MatrixUtil.cs
- Annotation.cs
- DetailsViewUpdatedEventArgs.cs