Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / TextDecorationCollection.cs / 1305600 / 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
- PageThemeParser.cs
- ComplexType.cs
- PrivilegedConfigurationManager.cs
- UInt16Converter.cs
- SelectionProviderWrapper.cs
- MailWebEventProvider.cs
- ExceptQueryOperator.cs
- PersonalizationStateInfoCollection.cs
- CompoundFileIOPermission.cs
- RichTextBoxAutomationPeer.cs
- XmlChildEnumerator.cs
- _SingleItemRequestCache.cs
- XmlDataSourceView.cs
- StandardOleMarshalObject.cs
- TreeNodeBinding.cs
- Hashtable.cs
- SessionStateSection.cs
- BindingCompleteEventArgs.cs
- WebBodyFormatMessageProperty.cs
- SafeProcessHandle.cs
- MessageBox.cs
- LocatorGroup.cs
- WebPartConnection.cs
- EntityTypeEmitter.cs
- UpdateException.cs
- XPathSelfQuery.cs
- DataSourceProvider.cs
- ClientCultureInfo.cs
- SystemIPAddressInformation.cs
- CompiledRegexRunner.cs
- UriSection.cs
- DTCTransactionManager.cs
- WebPartsPersonalizationAuthorization.cs
- WebBrowsableAttribute.cs
- AggregateNode.cs
- CompilerHelpers.cs
- WbmpConverter.cs
- Rectangle.cs
- ScrollData.cs
- InstanceDataCollectionCollection.cs
- DataGridViewMethods.cs
- ExpandSegmentCollection.cs
- SHA512Managed.cs
- View.cs
- MouseButtonEventArgs.cs
- ScaleTransform3D.cs
- ObjectDisposedException.cs
- EmissiveMaterial.cs
- ContentElementCollection.cs
- DataRecordInternal.cs
- BehaviorDragDropEventArgs.cs
- XmlSchemaException.cs
- ConfigurationValidatorBase.cs
- ObjectConverter.cs
- Int32AnimationUsingKeyFrames.cs
- _ProxyChain.cs
- PropertyChangedEventManager.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- AsmxEndpointPickerExtension.cs
- ScrollItemPatternIdentifiers.cs
- HyperlinkAutomationPeer.cs
- XmlSubtreeReader.cs
- TrackPointCollection.cs
- PropertyEmitter.cs
- ProcessHostFactoryHelper.cs
- ChildDocumentBlock.cs
- NullReferenceException.cs
- MatrixTransform3D.cs
- ObjectConverter.cs
- Attachment.cs
- IListConverters.cs
- OpenTypeLayoutCache.cs
- EventSinkHelperWriter.cs
- VisualTreeUtils.cs
- SchemaImporter.cs
- AutomationEvent.cs
- EntitySqlQueryState.cs
- DesignSurfaceServiceContainer.cs
- WindowsListBox.cs
- CurrentChangingEventManager.cs
- SurrogateSelector.cs
- DependencyPropertyConverter.cs
- WindowsTitleBar.cs
- ObjectViewFactory.cs
- GridLength.cs
- PropertyGridEditorPart.cs
- DateBoldEvent.cs
- WorkflowControlEndpoint.cs
- ImpersonateTokenRef.cs
- PeerToPeerException.cs
- EntityContainerEmitter.cs
- BaseResourcesBuildProvider.cs
- XmlException.cs
- ConstraintStruct.cs
- ListBindingConverter.cs
- WebPartManagerInternals.cs
- SmiTypedGetterSetter.cs
- WebPartEditorOkVerb.cs
- DataContractSet.cs
- NaturalLanguageHyphenator.cs