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
- SafeProcessHandle.cs
- XmlSchemaAnnotated.cs
- GridViewUpdatedEventArgs.cs
- SafeCryptoHandles.cs
- Point4D.cs
- InternalControlCollection.cs
- JsonReader.cs
- GraphicsState.cs
- SystemWebExtensionsSectionGroup.cs
- SchemaComplexType.cs
- Selection.cs
- QilInvokeEarlyBound.cs
- GeometryGroup.cs
- SolidColorBrush.cs
- ExtendedPropertyDescriptor.cs
- BaseDataBoundControl.cs
- MediaPlayerState.cs
- DbXmlEnabledProviderManifest.cs
- ListChangedEventArgs.cs
- SizeKeyFrameCollection.cs
- WebPartDescription.cs
- _Semaphore.cs
- X509LogoTypeExtension.cs
- DragDrop.cs
- DataKeyArray.cs
- MergeExecutor.cs
- ComponentGuaranteesAttribute.cs
- TemplateBuilder.cs
- DateTimeOffsetConverter.cs
- AxisAngleRotation3D.cs
- FirstMatchCodeGroup.cs
- TextServicesContext.cs
- MappingModelBuildProvider.cs
- DeflateStreamAsyncResult.cs
- DataGridCell.cs
- DataSourceProvider.cs
- DataRecordObjectView.cs
- UInt64Converter.cs
- SettingsPropertyValue.cs
- ReadOnlyDictionary.cs
- LinqDataSourceInsertEventArgs.cs
- VisualTreeUtils.cs
- AssociationSet.cs
- StringFormat.cs
- ImageBrush.cs
- ScriptControl.cs
- MultipleCopiesCollection.cs
- UniqueConstraint.cs
- SatelliteContractVersionAttribute.cs
- UpdatePanel.cs
- HttpCacheParams.cs
- InputScopeConverter.cs
- FontResourceCache.cs
- PolyBezierSegment.cs
- RequestChannel.cs
- UIElement.cs
- ComponentEditorForm.cs
- DataBindingList.cs
- ColorPalette.cs
- IdleTimeoutMonitor.cs
- TextEndOfSegment.cs
- DependencyObjectType.cs
- TextChange.cs
- BlurEffect.cs
- RelationshipFixer.cs
- BinaryFormatter.cs
- EDesignUtil.cs
- DrawingContextDrawingContextWalker.cs
- WindowsScrollBarBits.cs
- Visual3D.cs
- EditorAttribute.cs
- TagPrefixAttribute.cs
- Configuration.cs
- MulticastOption.cs
- BinaryUtilClasses.cs
- SqlDataSourceCache.cs
- SessionEndingEventArgs.cs
- ToolStripPanelRenderEventArgs.cs
- DescendantBaseQuery.cs
- ScaleTransform.cs
- OleDbConnectionFactory.cs
- D3DImage.cs
- XmlSchemaSimpleTypeUnion.cs
- TabItem.cs
- RequestTimeoutManager.cs
- ButtonStandardAdapter.cs
- SafeFileMappingHandle.cs
- DBBindings.cs
- SqlRemoveConstantOrderBy.cs
- XmlSchemaAnnotated.cs
- PartialTrustHelpers.cs
- PersistenceTypeAttribute.cs
- WebPartUtil.cs
- FileDialog.cs
- BamlCollectionHolder.cs
- ColumnReorderedEventArgs.cs
- ExitEventArgs.cs
- ExceptionValidationRule.cs
- ApplicationDirectoryMembershipCondition.cs
- IsolationInterop.cs