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
- TextOutput.cs
- CompiledIdentityConstraint.cs
- TimeZoneNotFoundException.cs
- FormViewInsertEventArgs.cs
- CallContext.cs
- GeometryModel3D.cs
- AdjustableArrowCap.cs
- BuildProvidersCompiler.cs
- RectValueSerializer.cs
- DiagnosticEventProvider.cs
- AppDomain.cs
- AssemblyInfo.cs
- RowBinding.cs
- NetworkInformationException.cs
- LicenseProviderAttribute.cs
- CssTextWriter.cs
- MailWriter.cs
- DataGridTable.cs
- BoundField.cs
- CacheDependency.cs
- DataGridViewCellStyle.cs
- GCHandleCookieTable.cs
- CriticalHandle.cs
- CompositeDuplexBindingElement.cs
- TransformedBitmap.cs
- DbConnectionInternal.cs
- InkCanvasSelectionAdorner.cs
- DataGridTextBox.cs
- _IPv6Address.cs
- BuildProviderAppliesToAttribute.cs
- ClaimSet.cs
- ResourceExpressionBuilder.cs
- ControlBindingsCollection.cs
- StreamingContext.cs
- QueryPageSettingsEventArgs.cs
- BaseAsyncResult.cs
- EncodingDataItem.cs
- DeclaredTypeElement.cs
- StringUtil.cs
- ArraySubsetEnumerator.cs
- PackageFilter.cs
- SqlResolver.cs
- DropShadowEffect.cs
- ImageCodecInfo.cs
- URLAttribute.cs
- FileVersion.cs
- TemplateControlCodeDomTreeGenerator.cs
- SqlIdentifier.cs
- ThicknessAnimation.cs
- DataControlPagerLinkButton.cs
- PermissionRequestEvidence.cs
- ClientFormsIdentity.cs
- DropDownList.cs
- XPathDescendantIterator.cs
- UIPermission.cs
- BigInt.cs
- SqlParameterCollection.cs
- Array.cs
- ValueConversionAttribute.cs
- SchemaImporterExtensionsSection.cs
- DataServiceHostFactory.cs
- WebControlAdapter.cs
- PropertyChangeTracker.cs
- HorizontalAlignConverter.cs
- ModelItemExtensions.cs
- NameValueCollection.cs
- Quaternion.cs
- DES.cs
- SemaphoreFullException.cs
- FixedSOMPage.cs
- TrackingServices.cs
- PageRanges.cs
- HtmlElementErrorEventArgs.cs
- XmlNodeWriter.cs
- SqlConnectionFactory.cs
- ListBoxChrome.cs
- BreadCrumbTextConverter.cs
- UpdatePanelTrigger.cs
- PrintDocument.cs
- ExpressionNode.cs
- CompilationRelaxations.cs
- DynamicDocumentPaginator.cs
- EntityProviderServices.cs
- AttributeData.cs
- GACIdentityPermission.cs
- webclient.cs
- RenderDataDrawingContext.cs
- ProfilePropertySettingsCollection.cs
- NativeMethods.cs
- UnionExpr.cs
- EncoderReplacementFallback.cs
- ClrProviderManifest.cs
- LabelAutomationPeer.cs
- TimeSpanConverter.cs
- TripleDESCryptoServiceProvider.cs
- MethodCallTranslator.cs
- TogglePatternIdentifiers.cs
- peersecurityelement.cs
- TransactionBridgeSection.cs
- Application.cs