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 / 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
- SqlInfoMessageEvent.cs
- ClientProtocol.cs
- DelegatingTypeDescriptionProvider.cs
- CollectionChangedEventManager.cs
- Events.cs
- JournalEntryListConverter.cs
- SchemaImporterExtension.cs
- Literal.cs
- IfJoinedCondition.cs
- RegexGroupCollection.cs
- TypeDescriptionProviderAttribute.cs
- baseaxisquery.cs
- DynamicMetaObject.cs
- HttpServerProtocol.cs
- HttpHandlerAction.cs
- ExtenderProvidedPropertyAttribute.cs
- TypeConverters.cs
- PrinterResolution.cs
- AttachedPropertyMethodSelector.cs
- RandomNumberGenerator.cs
- CodeSubDirectory.cs
- SspiWrapper.cs
- HttpRequest.cs
- Columns.cs
- ObjectAnimationBase.cs
- ObjectComplexPropertyMapping.cs
- TrackingMemoryStream.cs
- ConditionedDesigner.cs
- MissingFieldException.cs
- ToolStripMenuItem.cs
- TargetInvocationException.cs
- TraceProvider.cs
- SendKeys.cs
- SafeBitVector32.cs
- TypeBuilderInstantiation.cs
- DependencyProperty.cs
- ApplicationCommands.cs
- CryptoApi.cs
- ExpressionConverter.cs
- ExpressionVisitor.cs
- OutputWindow.cs
- KeyGesture.cs
- ContextMenuService.cs
- ContractSearchPattern.cs
- CollectionsUtil.cs
- DynamicPhysicalDiscoSearcher.cs
- X509ChainPolicy.cs
- ToolStripCustomTypeDescriptor.cs
- ResponseStream.cs
- HebrewNumber.cs
- IndependentlyAnimatedPropertyMetadata.cs
- ResourcePermissionBaseEntry.cs
- OrderedDictionary.cs
- SynchronizedInputAdaptor.cs
- _DisconnectOverlappedAsyncResult.cs
- Helpers.cs
- TreeNodeClickEventArgs.cs
- MobileDeviceCapabilitiesSectionHandler.cs
- WindowsScroll.cs
- EdmToObjectNamespaceMap.cs
- TwoPhaseCommit.cs
- WorkflowHostingResponseContext.cs
- RelatedEnd.cs
- EasingKeyFrames.cs
- RTTypeWrapper.cs
- SHA512Managed.cs
- SchemaTypeEmitter.cs
- ExpressionStringBuilder.cs
- TextSelectionHelper.cs
- Console.cs
- PointCollectionConverter.cs
- FixedTextView.cs
- FamilyTypeface.cs
- TextStore.cs
- CompModSwitches.cs
- ArgumentReference.cs
- StyleModeStack.cs
- TreeNodeStyle.cs
- DataGridCell.cs
- XmlDataSourceDesigner.cs
- ComponentManagerBroker.cs
- XmlIncludeAttribute.cs
- IISUnsafeMethods.cs
- EntityViewContainer.cs
- SelectManyQueryOperator.cs
- ThemeDirectoryCompiler.cs
- HtmlHistory.cs
- SemanticResultValue.cs
- CodeTypeParameterCollection.cs
- RowUpdatedEventArgs.cs
- PrintDialog.cs
- PublisherIdentityPermission.cs
- Vector3D.cs
- LowerCaseStringConverter.cs
- StateDesigner.cs
- PropertyValue.cs
- SourceFilter.cs
- ObjectListCommandCollection.cs
- EntitySetDataBindingList.cs
- SystemShuttingDownException.cs