Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Framework / System / Windows / SetterBaseCollection.cs / 1 / SetterBaseCollection.cs
/****************************************************************************\ * * File: SetterBaseCollection.cs * * A collection of SetterBase-derived classes. See use in Style.cs and other * places. * * Copyright (C) by Microsoft Corporation. All rights reserved. * \***************************************************************************/ using System.Collections.ObjectModel; // Collectionusing System.Diagnostics; // Debug.Assert using System.Windows.Data; // Binding knowledge using System.Windows.Media; // Visual knowledge using System.Windows.Markup; // MarkupExtension namespace System.Windows { /// /// A collection of SetterBase objects to be used /// in Template and its trigger classes /// public sealed class SetterBaseCollection : Collection{ #region ProtectedMethods /// /// ClearItems override /// protected override void ClearItems() { CheckSealed(); base.ClearItems(); } ////// InsertItem override /// protected override void InsertItem(int index, SetterBase item) { CheckSealed(); SetterBaseValidation(item); base.InsertItem(index, item); } ////// RemoveItem override /// protected override void RemoveItem(int index) { CheckSealed(); base.RemoveItem(index); } ////// SetItem override /// protected override void SetItem(int index, SetterBase item) { CheckSealed(); SetterBaseValidation(item); base.SetItem(index, item); } #endregion ProtectedMethods #region PublicMethods ////// Returns the sealed state of this object. If true, any attempt /// at modifying the state of this object will trigger an exception. /// public bool IsSealed { get { return _sealed; } } #endregion PublicMethods #region InternalMethods internal void Seal() { _sealed = true; // Seal all the setters for (int i=0; iusing System.Diagnostics; // Debug.Assert using System.Windows.Data; // Binding knowledge using System.Windows.Media; // Visual knowledge using System.Windows.Markup; // MarkupExtension namespace System.Windows { /// /// A collection of SetterBase objects to be used /// in Template and its trigger classes /// public sealed class SetterBaseCollection : Collection{ #region ProtectedMethods /// /// ClearItems override /// protected override void ClearItems() { CheckSealed(); base.ClearItems(); } ////// InsertItem override /// protected override void InsertItem(int index, SetterBase item) { CheckSealed(); SetterBaseValidation(item); base.InsertItem(index, item); } ////// RemoveItem override /// protected override void RemoveItem(int index) { CheckSealed(); base.RemoveItem(index); } ////// SetItem override /// protected override void SetItem(int index, SetterBase item) { CheckSealed(); SetterBaseValidation(item); base.SetItem(index, item); } #endregion ProtectedMethods #region PublicMethods ////// Returns the sealed state of this object. If true, any attempt /// at modifying the state of this object will trigger an exception. /// public bool IsSealed { get { return _sealed; } } #endregion PublicMethods #region InternalMethods internal void Seal() { _sealed = true; // Seal all the setters for (int i=0; i
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- LayoutSettings.cs
- AstTree.cs
- ComboBox.cs
- TransportationConfigurationTypeInstallComponent.cs
- ActivityMarkupSerializer.cs
- CompModHelpers.cs
- XmlSerializerAssemblyAttribute.cs
- DataGridViewControlCollection.cs
- X509ChainPolicy.cs
- PathFigure.cs
- PropertyNames.cs
- ToolboxItem.cs
- Matrix3D.cs
- SoapBinding.cs
- AnnotationResourceChangedEventArgs.cs
- StatusBarAutomationPeer.cs
- MouseCaptureWithinProperty.cs
- OleDbInfoMessageEvent.cs
- ServiceObjectContainer.cs
- DbDataReader.cs
- CharConverter.cs
- newinstructionaction.cs
- TextDecorationUnitValidation.cs
- KeyPressEvent.cs
- JournalEntryStack.cs
- StorageScalarPropertyMapping.cs
- VectorAnimationUsingKeyFrames.cs
- GenericWebPart.cs
- MobileDeviceCapabilitiesSectionHandler.cs
- ContainerParagraph.cs
- DrawingBrush.cs
- RSAPKCS1SignatureFormatter.cs
- String.cs
- Char.cs
- HwndSource.cs
- _KerberosClient.cs
- EventLogger.cs
- StoreAnnotationsMap.cs
- Icon.cs
- BlockCollection.cs
- SecurityElement.cs
- TimeSpan.cs
- XPathSelectionIterator.cs
- SafeProcessHandle.cs
- ParameterToken.cs
- XmlCountingReader.cs
- ChtmlTextBoxAdapter.cs
- ReliabilityContractAttribute.cs
- NavigationWindowAutomationPeer.cs
- PolicyLevel.cs
- TextContainer.cs
- CustomWebEventKey.cs
- XmlSerializationGeneratedCode.cs
- PlainXmlDeserializer.cs
- InstanceView.cs
- WindowsFormsHelpers.cs
- GeneratedView.cs
- MultilineStringConverter.cs
- InkCanvasFeedbackAdorner.cs
- OdbcEnvironmentHandle.cs
- RuleInfoComparer.cs
- IdentityHolder.cs
- ExtensionElement.cs
- AppDomainCompilerProxy.cs
- DefinitionBase.cs
- PixelFormatConverter.cs
- BufferedGraphics.cs
- DiscriminatorMap.cs
- ToolStripDropDownClosingEventArgs.cs
- PropertyInformationCollection.cs
- OdbcRowUpdatingEvent.cs
- WebSysDefaultValueAttribute.cs
- Expression.DebuggerProxy.cs
- Button.cs
- OperationParameterInfoCollection.cs
- IResourceProvider.cs
- ProcessHostMapPath.cs
- XmlNavigatorStack.cs
- LocatorManager.cs
- EventBuilder.cs
- MouseEventArgs.cs
- EventLogPermission.cs
- ServiceOperationUIEditor.cs
- CharacterHit.cs
- KeyGesture.cs
- WebBrowserNavigatedEventHandler.cs
- WebPartDisplayModeCancelEventArgs.cs
- XmlUrlResolver.cs
- AutomationPeer.cs
- SqlUserDefinedAggregateAttribute.cs
- OdbcConnection.cs
- CapabilitiesPattern.cs
- FixedTextBuilder.cs
- ProfileModule.cs
- AmbientValueAttribute.cs
- SamlAuthenticationStatement.cs
- NullExtension.cs
- Random.cs
- WindowClosedEventArgs.cs
- Evidence.cs