Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- Parser.cs
- LinkedResource.cs
- XmlArrayItemAttribute.cs
- ProfileBuildProvider.cs
- _RequestCacheProtocol.cs
- BamlLocalizableResourceKey.cs
- AssemblyResourceLoader.cs
- LinqDataSourceHelper.cs
- NamespaceTable.cs
- InputManager.cs
- InboundActivityHelper.cs
- SqlProfileProvider.cs
- SystemEvents.cs
- Trace.cs
- TextEditorDragDrop.cs
- ListItem.cs
- SslStream.cs
- UndirectedGraph.cs
- Stylesheet.cs
- filewebrequest.cs
- TextSchema.cs
- BitmapSourceSafeMILHandle.cs
- DateTimeStorage.cs
- Material.cs
- ChameleonKey.cs
- ActivityMarkupSerializationProvider.cs
- FtpWebResponse.cs
- SignatureHelper.cs
- GridViewUpdatedEventArgs.cs
- MembershipPasswordException.cs
- SystemMulticastIPAddressInformation.cs
- OutputScope.cs
- TextStore.cs
- ShaderEffect.cs
- SizeKeyFrameCollection.cs
- ExceptionValidationRule.cs
- NotFiniteNumberException.cs
- Size3D.cs
- ExpressionEditorSheet.cs
- FormatVersion.cs
- IntSecurity.cs
- TypeUtil.cs
- IdentityReference.cs
- TextEffect.cs
- XMLSyntaxException.cs
- ImagingCache.cs
- FontStyle.cs
- GlobalProxySelection.cs
- InputScopeConverter.cs
- RemotingAttributes.cs
- ScriptDescriptor.cs
- ByteStreamMessageUtility.cs
- VisemeEventArgs.cs
- TypeSystem.cs
- ContainerControlDesigner.cs
- SqlDependency.cs
- RadioButtonList.cs
- MiniCustomAttributeInfo.cs
- TransformFinalBlockRequest.cs
- ToolBarOverflowPanel.cs
- FixedTextSelectionProcessor.cs
- DispatchChannelSink.cs
- StorageRoot.cs
- ArcSegment.cs
- Stream.cs
- TrustManagerPromptUI.cs
- DateTimeConverter2.cs
- _HeaderInfo.cs
- InplaceBitmapMetadataWriter.cs
- DataGridColumnHeaderItemAutomationPeer.cs
- Vertex.cs
- Rule.cs
- Expression.cs
- BindingsCollection.cs
- TiffBitmapEncoder.cs
- DataGridViewAutoSizeModeEventArgs.cs
- WebPartTracker.cs
- PasswordRecoveryDesigner.cs
- EntityTypeBase.cs
- StickyNote.cs
- CodePageEncoding.cs
- OutputScope.cs
- VisualStateChangedEventArgs.cs
- TemplatedAdorner.cs
- LastQueryOperator.cs
- MobileControlDesigner.cs
- Atom10FormatterFactory.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- ListViewVirtualItemsSelectionRangeChangedEvent.cs
- PolicyStatement.cs
- StreamResourceInfo.cs
- QuaternionIndependentAnimationStorage.cs
- ByteArrayHelperWithString.cs
- X509SubjectKeyIdentifierClause.cs
- FilteredSchemaElementLookUpTable.cs
- FontFamilyValueSerializer.cs
- WebPartEditorCancelVerb.cs
- HandlerBase.cs
- CallSiteOps.cs