Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / SetterBaseCollection.cs / 1305600 / 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; i
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ImageFormat.cs
- TextRunCacheImp.cs
- Vector3DConverter.cs
- _SslSessionsCache.cs
- XmlnsDictionary.cs
- MetadataProperty.cs
- ConfigurationSectionGroup.cs
- GridViewDeletedEventArgs.cs
- WinCategoryAttribute.cs
- ImageField.cs
- NameValuePermission.cs
- Utilities.cs
- WpfWebRequestHelper.cs
- IndexedString.cs
- CompiledXpathExpr.cs
- NullableFloatSumAggregationOperator.cs
- ScrollChrome.cs
- DynamicMetaObject.cs
- GraphicsState.cs
- XmlQueryOutput.cs
- NameValueCache.cs
- Pen.cs
- SelectingProviderEventArgs.cs
- GPPOINT.cs
- TextOnlyOutput.cs
- SrgsOneOf.cs
- BindingOperations.cs
- XmlSchemaCompilationSettings.cs
- DataAdapter.cs
- EntityConnection.cs
- XmlAttributeAttribute.cs
- Rotation3DAnimationBase.cs
- regiisutil.cs
- HttpWebRequestElement.cs
- BamlRecordReader.cs
- OracleBinary.cs
- SQLGuid.cs
- AttachInfo.cs
- UIntPtr.cs
- FileDetails.cs
- WebPartZoneCollection.cs
- CommandLibraryHelper.cs
- ReferenceService.cs
- ContextMenuStripGroup.cs
- Globals.cs
- SQLMoneyStorage.cs
- BamlTreeMap.cs
- KeyedHashAlgorithm.cs
- dbdatarecord.cs
- CommonGetThemePartSize.cs
- BuilderInfo.cs
- TransformerTypeCollection.cs
- CultureSpecificStringDictionary.cs
- WorkerRequest.cs
- SecurityTokenTypes.cs
- counter.cs
- XPathSelfQuery.cs
- mediaeventargs.cs
- SessionParameter.cs
- InteropExecutor.cs
- OdbcEnvironment.cs
- DSACryptoServiceProvider.cs
- ObservableCollection.cs
- TypeInfo.cs
- TypeHelper.cs
- XmlILOptimizerVisitor.cs
- XPathDocumentNavigator.cs
- ConfigurationValidatorAttribute.cs
- StylusDownEventArgs.cs
- XmlComment.cs
- VolatileEnlistmentMultiplexing.cs
- NativeMethods.cs
- NamespaceInfo.cs
- ProxyGenerator.cs
- FacetChecker.cs
- RightsManagementInformation.cs
- PeerTransportElement.cs
- EmptyEnumerator.cs
- IndexerReference.cs
- ScrollData.cs
- UnsafeNativeMethods.cs
- InvalidPrinterException.cs
- LastQueryOperator.cs
- CodeValidator.cs
- PropertyInformation.cs
- ExpressionBuilder.cs
- ImageMetadata.cs
- ResourceAssociationTypeEnd.cs
- PtsHelper.cs
- XamlFigureLengthSerializer.cs
- BulletedListEventArgs.cs
- processwaithandle.cs
- TextParaClient.cs
- NameScope.cs
- LinearGradientBrush.cs
- RtfToXamlReader.cs
- SettingsAttributeDictionary.cs
- RayMeshGeometry3DHitTestResult.cs
- DispatcherTimer.cs
- SpecialFolderEnumConverter.cs