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
- DescriptionAttribute.cs
- WebPartTransformerCollection.cs
- UseLicense.cs
- DecimalFormatter.cs
- SelectedGridItemChangedEvent.cs
- PresentationTraceSources.cs
- MaskedTextProvider.cs
- Profiler.cs
- LexicalChunk.cs
- PerfService.cs
- RuntimeComponentFilter.cs
- XslAst.cs
- Pkcs7Signer.cs
- StyleCollection.cs
- RoutingService.cs
- ToolStripHighContrastRenderer.cs
- GraphicsPathIterator.cs
- ContextProperty.cs
- PerformanceCounterCategory.cs
- FreezableCollection.cs
- _AutoWebProxyScriptWrapper.cs
- SqlDeflator.cs
- SqlConnectionHelper.cs
- SelectorItemAutomationPeer.cs
- Serializer.cs
- TableLayoutPanelDesigner.cs
- BitHelper.cs
- MemberPath.cs
- PropertyChange.cs
- HttpAsyncResult.cs
- ToolStripSystemRenderer.cs
- ImplicitInputBrush.cs
- ExternalDataExchangeService.cs
- BitmapImage.cs
- PartialList.cs
- UnsafeNativeMethods.cs
- LabelEditEvent.cs
- SplayTreeNode.cs
- FunctionImportMapping.ReturnTypeRenameMapping.cs
- ToolStripContentPanelRenderEventArgs.cs
- MessageLoggingFilterTraceRecord.cs
- __Filters.cs
- SqlRewriteScalarSubqueries.cs
- BCLDebug.cs
- ColorTransform.cs
- DataTableTypeConverter.cs
- Root.cs
- ChannelEndpointElement.cs
- documentsequencetextpointer.cs
- RadioButton.cs
- MenuItem.cs
- DeflateEmulationStream.cs
- Propagator.JoinPropagator.cs
- CatalogZone.cs
- OAVariantLib.cs
- AnnotationMap.cs
- ServiceHttpHandlerFactory.cs
- OleDbErrorCollection.cs
- CalendarDay.cs
- MtomMessageEncoder.cs
- PerfProviderCollection.cs
- WebPartConnectionsConnectVerb.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- MexBindingBindingCollectionElement.cs
- LinkLabelLinkClickedEvent.cs
- HebrewCalendar.cs
- Internal.cs
- IHttpResponseInternal.cs
- DataGridViewDataErrorEventArgs.cs
- SqlExpressionNullability.cs
- ToolStripGripRenderEventArgs.cs
- IOException.cs
- WebCodeGenerator.cs
- CopyOnWriteList.cs
- FolderLevelBuildProvider.cs
- WindowsServiceElement.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- ErrorsHelper.cs
- HostingEnvironmentSection.cs
- DataTableNewRowEvent.cs
- Expressions.cs
- KeyedHashAlgorithm.cs
- ContextBase.cs
- FileDialogCustomPlace.cs
- WindowsIPAddress.cs
- SingleStorage.cs
- BaseParaClient.cs
- GradientStopCollection.cs
- DataGridViewHitTestInfo.cs
- ControlIdConverter.cs
- Stream.cs
- _ShellExpression.cs
- CodeCommentStatementCollection.cs
- Pipe.cs
- BlurBitmapEffect.cs
- JumpTask.cs
- HttpModuleCollection.cs
- CatalogPartChrome.cs
- SqlGenerator.cs
- ToolStripItemDesigner.cs