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
- Pair.cs
- SignedXml.cs
- IndexOutOfRangeException.cs
- BitmapEffectDrawingContextWalker.cs
- DataTableMapping.cs
- PassportAuthenticationModule.cs
- UidPropertyAttribute.cs
- TraceUtility.cs
- FileUtil.cs
- ExpressionBuilder.cs
- EventLogEntry.cs
- OdbcConnection.cs
- Form.cs
- CellNormalizer.cs
- CompletionCallbackWrapper.cs
- TemplatedAdorner.cs
- KeyInterop.cs
- XmlSchemaType.cs
- ISessionStateStore.cs
- PointConverter.cs
- UnsafeNetInfoNativeMethods.cs
- AuthorizationContext.cs
- BasicCellRelation.cs
- ErrorFormatterPage.cs
- M3DUtil.cs
- FormViewPageEventArgs.cs
- RsaEndpointIdentity.cs
- Types.cs
- SqlMethodCallConverter.cs
- RelationshipManager.cs
- RectangleHotSpot.cs
- SByteConverter.cs
- SpellerHighlightLayer.cs
- AnonymousIdentificationSection.cs
- DependencyPropertyKey.cs
- BitmapMetadataEnumerator.cs
- invalidudtexception.cs
- ContainerControl.cs
- XPathNodeList.cs
- ProfilePropertyNameValidator.cs
- RewritingProcessor.cs
- GeometryModel3D.cs
- XslTransform.cs
- MethodBuilder.cs
- ObjectContext.cs
- Point4D.cs
- MemberProjectionIndex.cs
- AttributeAction.cs
- XmlTypeMapping.cs
- BitmapEffectState.cs
- Triplet.cs
- DataColumnChangeEvent.cs
- CodeAttributeArgumentCollection.cs
- MimeFormImporter.cs
- PanelDesigner.cs
- EntityWithChangeTrackerStrategy.cs
- WindowsFormsHostPropertyMap.cs
- PrivilegedConfigurationManager.cs
- SafeJobHandle.cs
- HttpResponseInternalWrapper.cs
- UnsafeNativeMethods.cs
- TableParagraph.cs
- ConfigXmlWhitespace.cs
- SessionStateItemCollection.cs
- HttpHeaderCollection.cs
- RegisteredExpandoAttribute.cs
- ImageBrush.cs
- HttpCacheVaryByContentEncodings.cs
- ActivityExecutionContextCollection.cs
- SoapTypeAttribute.cs
- BinaryNode.cs
- ApplicationSecurityInfo.cs
- CodeDomConfigurationHandler.cs
- Comparer.cs
- NonVisualControlAttribute.cs
- LineVisual.cs
- Helpers.cs
- ThrowHelper.cs
- ApplicationProxyInternal.cs
- QuaternionAnimation.cs
- TimelineCollection.cs
- SqlDataSourceQueryEditorForm.cs
- Tablet.cs
- ContentOperations.cs
- ScriptingScriptResourceHandlerSection.cs
- BaseDataBoundControl.cs
- RequestResizeEvent.cs
- UrlMappingsModule.cs
- InfocardInteractiveChannelInitializer.cs
- GroupItem.cs
- XmlSecureResolver.cs
- SqlIdentifier.cs
- AuthenticationModulesSection.cs
- OdbcHandle.cs
- PropertyPathConverter.cs
- ClosableStream.cs
- EventRoute.cs
- DataGridItem.cs
- CodeTypeMember.cs
- HtmlButton.cs