Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Framework / System / Windows / ConditionCollection.cs / 1 / ConditionCollection.cs
/****************************************************************************\ * * File: ConditionCollection.cs * * A collection of Condition-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 Condition objects to be used /// in Template and its trigger classes /// public sealed class ConditionCollection : Collection{ #region ProtectedMethods /// /// ClearItems override /// protected override void ClearItems() { CheckSealed(); base.ClearItems(); } ////// InsertItem override /// protected override void InsertItem(int index, Condition item) { CheckSealed(); ConditionValidation(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, Condition item) { CheckSealed(); ConditionValidation(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(ValueLookupType type) { _sealed = true; // Seal all the conditions 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 Condition objects to be used /// in Template and its trigger classes /// public sealed class ConditionCollection : Collection{ #region ProtectedMethods /// /// ClearItems override /// protected override void ClearItems() { CheckSealed(); base.ClearItems(); } ////// InsertItem override /// protected override void InsertItem(int index, Condition item) { CheckSealed(); ConditionValidation(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, Condition item) { CheckSealed(); ConditionValidation(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(ValueLookupType type) { _sealed = true; // Seal all the conditions for (int i=0; i
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Pen.cs
- XmlNamespaceMappingCollection.cs
- NodeCounter.cs
- sqlmetadatafactory.cs
- ResXResourceWriter.cs
- AccessDataSourceView.cs
- Fonts.cs
- PropertyCondition.cs
- MsmqProcessProtocolHandler.cs
- HttpApplicationStateBase.cs
- CommonRemoteMemoryBlock.cs
- DataRow.cs
- BlobPersonalizationState.cs
- NameValueFileSectionHandler.cs
- Container.cs
- dataprotectionpermissionattribute.cs
- WindowsNonControl.cs
- CngAlgorithm.cs
- UserControl.cs
- DataBoundControlParameterTarget.cs
- SiteMembershipCondition.cs
- EnumMember.cs
- CommandCollectionEditor.cs
- JsonMessageEncoderFactory.cs
- BitmapEffectDrawingContextWalker.cs
- CompilerErrorCollection.cs
- EdmComplexPropertyAttribute.cs
- DefaultValueTypeConverter.cs
- RegexCapture.cs
- JsonDeserializer.cs
- ResXFileRef.cs
- _ListenerRequestStream.cs
- RelationshipConverter.cs
- StatusBarPanel.cs
- UriScheme.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- httpserverutility.cs
- PieceDirectory.cs
- SecurityHeaderLayout.cs
- CircleHotSpot.cs
- SystemNetworkInterface.cs
- VerificationAttribute.cs
- SiteMapNodeCollection.cs
- NativeCompoundFileAPIs.cs
- ResourceCategoryAttribute.cs
- DataSourceControlBuilder.cs
- ReaderWriterLock.cs
- TreeWalkHelper.cs
- CommandLineParser.cs
- WeakHashtable.cs
- Visual3DCollection.cs
- DataControlPagerLinkButton.cs
- AssemblyResourceLoader.cs
- SQlBooleanStorage.cs
- Viewport3DVisual.cs
- DataSourceDesigner.cs
- CryptoStream.cs
- ModifierKeysConverter.cs
- FileSystemInfo.cs
- TemplateKey.cs
- AssemblyName.cs
- OleDbConnection.cs
- CryptoProvider.cs
- HostExecutionContextManager.cs
- WebPartZoneBase.cs
- BindStream.cs
- SweepDirectionValidation.cs
- ListenerBinder.cs
- SchemaEntity.cs
- GeneralTransform3D.cs
- TreeViewImageIndexConverter.cs
- BaseCodeDomTreeGenerator.cs
- AddInIpcChannel.cs
- TabControl.cs
- cookiecollection.cs
- TextTrailingWordEllipsis.cs
- FileDialog_Vista_Interop.cs
- OracleString.cs
- CommonGetThemePartSize.cs
- WebServiceMethodData.cs
- AssemblyBuilder.cs
- StrokeNodeData.cs
- SecurityTokenAuthenticator.cs
- hresults.cs
- XmlUtf8RawTextWriter.cs
- MenuTracker.cs
- ListBase.cs
- ContainerAction.cs
- SortKey.cs
- Utils.cs
- ButtonStandardAdapter.cs
- MenuBase.cs
- PropertyInfoSet.cs
- DataBinder.cs
- CryptoStream.cs
- TableCell.cs
- DecimalKeyFrameCollection.cs
- Function.cs
- ControllableStoryboardAction.cs
- WorkItem.cs