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
- NamespaceInfo.cs
- ToolConsole.cs
- TypeReference.cs
- ExpressionVisitorHelpers.cs
- DataControlFieldCollection.cs
- GraphicsState.cs
- mactripleDES.cs
- ObjectMemberMapping.cs
- X509ServiceCertificateAuthenticationElement.cs
- TrackingServices.cs
- PersonalizationAdministration.cs
- IIS7UserPrincipal.cs
- _DomainName.cs
- BinaryFormatter.cs
- XmlAnyElementAttribute.cs
- TimeSpanMinutesConverter.cs
- DebugView.cs
- MemberHolder.cs
- GridViewSelectEventArgs.cs
- DialogBaseForm.cs
- BitmapFrame.cs
- SqlAliasesReferenced.cs
- DiagnosticsConfiguration.cs
- WbmpConverter.cs
- RawStylusInputReport.cs
- HtmlWindowCollection.cs
- CallbackValidator.cs
- ProtectedConfigurationSection.cs
- DataBindEngine.cs
- GridItemPatternIdentifiers.cs
- IDReferencePropertyAttribute.cs
- ExpressionStringBuilder.cs
- SignedXml.cs
- ClientCultureInfo.cs
- Rotation3DKeyFrameCollection.cs
- RegexStringValidator.cs
- FileClassifier.cs
- HttpValueCollection.cs
- OracleParameter.cs
- SymbolMethod.cs
- ObjectContext.cs
- FocusTracker.cs
- TextServicesContext.cs
- IdentityModelStringsVersion1.cs
- OleDbDataReader.cs
- FileDialog_Vista.cs
- MenuAdapter.cs
- HiddenFieldPageStatePersister.cs
- CodeDelegateCreateExpression.cs
- PenLineCapValidation.cs
- AppSettingsExpressionBuilder.cs
- MediaPlayerState.cs
- ContractListAdapter.cs
- TextEffectResolver.cs
- LogLogRecord.cs
- DataObjectCopyingEventArgs.cs
- SimpleBitVector32.cs
- MeasureData.cs
- SelectionItemProviderWrapper.cs
- SerializerWriterEventHandlers.cs
- HttpClientCertificate.cs
- PinnedBufferMemoryStream.cs
- RotateTransform3D.cs
- CqlLexer.cs
- Permission.cs
- NativeCppClassAttribute.cs
- SqlDataSourceSummaryPanel.cs
- ResourcePermissionBaseEntry.cs
- GlyphingCache.cs
- BrowserTree.cs
- MissingMethodException.cs
- ProgressBarHighlightConverter.cs
- XmlNullResolver.cs
- FontWeight.cs
- FormViewUpdatedEventArgs.cs
- GridViewRowPresenter.cs
- Cursor.cs
- InheritedPropertyChangedEventArgs.cs
- HashCodeCombiner.cs
- SynchronizingStream.cs
- CompatibleComparer.cs
- SoapHeader.cs
- InfoCardClaimCollection.cs
- RelatedPropertyManager.cs
- QueryConverter.cs
- DataServiceRequestException.cs
- XmlDictionaryWriter.cs
- XamlReaderHelper.cs
- EntitySqlQueryState.cs
- InstalledFontCollection.cs
- AssemblyBuilder.cs
- LocalFileSettingsProvider.cs
- BaseParagraph.cs
- FontConverter.cs
- FixedLineResult.cs
- WebPartUtil.cs
- MessageLoggingElement.cs
- DecimalSumAggregationOperator.cs
- FontDifferentiator.cs
- EventDescriptorCollection.cs