Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- PreloadedPackages.cs
- WindowsImpersonationContext.cs
- SoapServerProtocol.cs
- DataGridPagerStyle.cs
- PeerNameResolver.cs
- DataGridCell.cs
- RootBrowserWindowAutomationPeer.cs
- FutureFactory.cs
- Soap.cs
- SpecularMaterial.cs
- CommonEndpointBehaviorElement.cs
- MetadataWorkspace.cs
- BitmapSizeOptions.cs
- StringResourceManager.cs
- TypeUsageBuilder.cs
- XamlTreeBuilder.cs
- SymDocumentType.cs
- MemberNameValidator.cs
- RoutedEvent.cs
- LocalizationCodeDomSerializer.cs
- FirstMatchCodeGroup.cs
- SafeNativeMethods.cs
- ExpressionNode.cs
- ObjectDataSourceMethodEventArgs.cs
- TimeSpan.cs
- GlyphInfoList.cs
- XmlDataProvider.cs
- ReferencedAssembly.cs
- ACL.cs
- ListDataBindEventArgs.cs
- MatrixAnimationUsingKeyFrames.cs
- SettingsAttributeDictionary.cs
- XmlMapping.cs
- ShaperBuffers.cs
- CompareInfo.cs
- CachedFontFamily.cs
- DbProviderFactoriesConfigurationHandler.cs
- RolePrincipal.cs
- TextChange.cs
- QueryOutputWriter.cs
- XXXInfos.cs
- OdbcConnection.cs
- GrammarBuilderDictation.cs
- EditingCoordinator.cs
- NumericExpr.cs
- ScopelessEnumAttribute.cs
- wgx_exports.cs
- ExternalException.cs
- CodeTryCatchFinallyStatement.cs
- TextModifier.cs
- DetailsViewActionList.cs
- ToolBar.cs
- DSACryptoServiceProvider.cs
- EventSinkActivityDesigner.cs
- SiblingIterators.cs
- BitmapPalette.cs
- ItemContainerGenerator.cs
- DependencyPropertyConverter.cs
- DictionaryBase.cs
- TreeNodeSelectionProcessor.cs
- CodeExpressionStatement.cs
- LayoutManager.cs
- Journal.cs
- TraceListener.cs
- List.cs
- CharacterShapingProperties.cs
- Tag.cs
- CollectionBase.cs
- ConfigsHelper.cs
- DynamicScriptObject.cs
- DataGridColumnCollection.cs
- AuthenticationSchemesHelper.cs
- SqlDataReader.cs
- QilXmlWriter.cs
- ViewManagerAttribute.cs
- ExpressionBuilder.cs
- FixedElement.cs
- HttpListenerRequest.cs
- SqlServer2KCompatibilityCheck.cs
- PropertyGeneratedEventArgs.cs
- MetabaseServerConfig.cs
- Keywords.cs
- URLString.cs
- Double.cs
- BidOverLoads.cs
- TextPointer.cs
- OSFeature.cs
- SqlInternalConnectionTds.cs
- RuntimeConfigLKG.cs
- XmlUtil.cs
- DtdParser.cs
- DataStorage.cs
- InternalConfigSettingsFactory.cs
- DateTimeOffsetAdapter.cs
- LockedActivityGlyph.cs
- PngBitmapDecoder.cs
- X509ServiceCertificateAuthentication.cs
- ValidationRule.cs
- ObjectListItem.cs
- CngKeyBlobFormat.cs