Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / wpf / src / Core / CSharp / System / Windows / TextDecorationCollection.cs / 1 / TextDecorationCollection.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // // Description: TextDecorationCollection class // // History: // 10/14/2004: Garyyang Created the file // //--------------------------------------------------------------------------- using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Globalization; using System.Windows.Media.Animation; using System.Windows.Markup; using MS.Internal.PresentationCore; namespace System.Windows { ////// A collection of text decoration instances /// [TypeConverter(typeof(TextDecorationCollectionConverter))] [Localizability(LocalizationCategory.None, Readability=Readability.Unreadable)] public sealed partial class TextDecorationCollection : Animatable, IList { ////// Compare this collection with another TextDecorations. /// /// the text decoration collection to be compared ///true if two collections of TextDecorations contain equal TextDecoration objects in the /// the same order. false otherwise /// ////// The method doesn't check "full" equality as it can not take into account of all the possible /// values associated with the DependencyObject,such as Animation, DataBinding and Attached property. /// It only compares the public properties to serve the specific Framework's needs in inline property /// management and Editing serialization. /// [FriendAccessAllowed] // used by Framework internal bool ValueEquals(TextDecorationCollection textDecorations) { if (textDecorations == null) return false; // o is either null or not TextDecorations object if (this == textDecorations) return true; // Reference equality. if ( this.Count != textDecorations.Count) return false; // Two counts are different. // To be considered equal, TextDecorations should be same in the exact order. // Order matters because they imply the Z-order of the text decorations on screen. // Same set of text decorations drawn with different orders may have different result. for (int i = 0; i < this.Count; i++) { if (!this[i].ValueEquals(textDecorations[i])) return false; } return true; } ////// Add a collection of text decorations into the current collection /// /// The collection to be added [CLSCompliant(false)] public void Add(IEnumerabletextDecorations) { if (textDecorations == null) { throw new ArgumentNullException("textDecorations"); } foreach(TextDecoration textDecoration in textDecorations) { Add(textDecoration); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //---------------------------------------------------------------------------- // // // Copyright (C) Microsoft Corporation. All rights reserved. // // // // Description: TextDecorationCollection class // // History: // 10/14/2004: Garyyang Created the file // //--------------------------------------------------------------------------- using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Globalization; using System.Windows.Media.Animation; using System.Windows.Markup; using MS.Internal.PresentationCore; namespace System.Windows { ////// A collection of text decoration instances /// [TypeConverter(typeof(TextDecorationCollectionConverter))] [Localizability(LocalizationCategory.None, Readability=Readability.Unreadable)] public sealed partial class TextDecorationCollection : Animatable, IList { ////// Compare this collection with another TextDecorations. /// /// the text decoration collection to be compared ///true if two collections of TextDecorations contain equal TextDecoration objects in the /// the same order. false otherwise /// ////// The method doesn't check "full" equality as it can not take into account of all the possible /// values associated with the DependencyObject,such as Animation, DataBinding and Attached property. /// It only compares the public properties to serve the specific Framework's needs in inline property /// management and Editing serialization. /// [FriendAccessAllowed] // used by Framework internal bool ValueEquals(TextDecorationCollection textDecorations) { if (textDecorations == null) return false; // o is either null or not TextDecorations object if (this == textDecorations) return true; // Reference equality. if ( this.Count != textDecorations.Count) return false; // Two counts are different. // To be considered equal, TextDecorations should be same in the exact order. // Order matters because they imply the Z-order of the text decorations on screen. // Same set of text decorations drawn with different orders may have different result. for (int i = 0; i < this.Count; i++) { if (!this[i].ValueEquals(textDecorations[i])) return false; } return true; } ////// Add a collection of text decorations into the current collection /// /// The collection to be added [CLSCompliant(false)] public void Add(IEnumerabletextDecorations) { if (textDecorations == null) { throw new ArgumentNullException("textDecorations"); } foreach(TextDecoration textDecoration in textDecorations) { Add(textDecoration); } } } } // 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
- Brush.cs
- SafeEventHandle.cs
- UpdateException.cs
- RectAnimationUsingKeyFrames.cs
- ButtonFlatAdapter.cs
- HatchBrush.cs
- ConstraintCollection.cs
- ActiveXHelper.cs
- RequestQueue.cs
- storepermissionattribute.cs
- SyndicationContent.cs
- ResourceDefaultValueAttribute.cs
- SafeIUnknown.cs
- XmlElementAttributes.cs
- SqlDataSource.cs
- MarkupExtensionReturnTypeAttribute.cs
- CodeVariableReferenceExpression.cs
- WebPartActionVerb.cs
- Int64AnimationBase.cs
- ComboBox.cs
- BinarySecretSecurityToken.cs
- FontCacheUtil.cs
- PropertyConverter.cs
- OdbcErrorCollection.cs
- XXXInfos.cs
- DbConnectionPoolCounters.cs
- TransformedBitmap.cs
- CryptoConfig.cs
- SoapReflectionImporter.cs
- ProcessRequestAsyncResult.cs
- ScriptControlDescriptor.cs
- FileSystemInfo.cs
- DesignerActionKeyboardBehavior.cs
- FigureParagraph.cs
- HttpConfigurationContext.cs
- JpegBitmapEncoder.cs
- Stream.cs
- TypeSystemHelpers.cs
- Convert.cs
- XPathMessageContext.cs
- AliasExpr.cs
- RegionData.cs
- PieceDirectory.cs
- ObjectStateManagerMetadata.cs
- SoapReflector.cs
- OneWayChannelFactory.cs
- SchemaElementLookUpTable.cs
- PixelShader.cs
- AssertFilter.cs
- FilterElement.cs
- CompensationHandlingFilter.cs
- TemplateContainer.cs
- DropShadowBitmapEffect.cs
- EncryptedType.cs
- PropertyDescriptorCollection.cs
- InstalledVoice.cs
- SystemInformation.cs
- ThrowHelper.cs
- DesignRelation.cs
- WaitForChangedResult.cs
- OleDbMetaDataFactory.cs
- ContractType.cs
- CalendarTable.cs
- DataRelationPropertyDescriptor.cs
- ExportOptions.cs
- autovalidator.cs
- ArcSegment.cs
- WebBrowserNavigatedEventHandler.cs
- ScrollPatternIdentifiers.cs
- EncryptedKey.cs
- HtmlControl.cs
- PolyLineSegment.cs
- DependencyProperty.cs
- HttpProfileGroupBase.cs
- UrlPropertyAttribute.cs
- TdsParameterSetter.cs
- Compiler.cs
- ParameterBuilder.cs
- DataServiceProviderWrapper.cs
- ProvideValueServiceProvider.cs
- TemplatePropertyEntry.cs
- WebPartTransformer.cs
- ConvertTextFrag.cs
- ObjectTypeMapping.cs
- Rect.cs
- MethodSignatureGenerator.cs
- FormViewInsertEventArgs.cs
- BitmapEffectGroup.cs
- X509ChainPolicy.cs
- LinqDataSourceContextData.cs
- ProcessThreadDesigner.cs
- HtmlTextArea.cs
- DataControlFieldCell.cs
- HttpEncoderUtility.cs
- XmlSchemaSimpleContentExtension.cs
- DiscoveryDocumentSerializer.cs
- XmlTextAttribute.cs
- ListViewUpdateEventArgs.cs
- Subtree.cs
- ImpersonateTokenRef.cs