Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- TreeNodeMouseHoverEvent.cs
- SpeechEvent.cs
- LinqDataSource.cs
- HWStack.cs
- QueueProcessor.cs
- MimeMultiPart.cs
- EastAsianLunisolarCalendar.cs
- compensatingcollection.cs
- CharKeyFrameCollection.cs
- CodeBinaryOperatorExpression.cs
- SR.Designer.cs
- SizeAnimationUsingKeyFrames.cs
- SQLBinaryStorage.cs
- CardSpaceSelector.cs
- InfoCardRSAPKCS1SignatureDeformatter.cs
- _BaseOverlappedAsyncResult.cs
- MonthCalendar.cs
- TreeViewTemplateSelector.cs
- AspNetSynchronizationContext.cs
- AppDomainProtocolHandler.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- ProviderCommandInfoUtils.cs
- HtmlTableCellCollection.cs
- DecimalKeyFrameCollection.cs
- EtwTrace.cs
- ExternalException.cs
- FixedTextView.cs
- Highlights.cs
- WorkflowOwnershipException.cs
- querybuilder.cs
- PersistChildrenAttribute.cs
- ParseChildrenAsPropertiesAttribute.cs
- IListConverters.cs
- TextBlock.cs
- EdmItemError.cs
- RadioButtonList.cs
- TextParagraph.cs
- XmlIterators.cs
- DataGridRowAutomationPeer.cs
- AnimationTimeline.cs
- HttpCacheParams.cs
- Transform.cs
- Grant.cs
- EpmCustomContentDeSerializer.cs
- SqlPersistenceWorkflowInstanceDescription.cs
- DataGridViewTextBoxCell.cs
- MouseEventArgs.cs
- VirtualDirectoryMapping.cs
- Size3DValueSerializer.cs
- ParenthesizePropertyNameAttribute.cs
- FunctionImportElement.cs
- TemplateKey.cs
- Evaluator.cs
- JsonFormatMapping.cs
- SQLDecimalStorage.cs
- ListenerConnectionDemuxer.cs
- Socket.cs
- ByteStreamGeometryContext.cs
- TemplateInstanceAttribute.cs
- ServiceReference.cs
- Array.cs
- BufferedMessageWriter.cs
- AdRotator.cs
- NotConverter.cs
- HwndHostAutomationPeer.cs
- FontStyleConverter.cs
- ProcessManager.cs
- AttributeQuery.cs
- SystemColors.cs
- MimeWriter.cs
- DataAdapter.cs
- ConfigurationStrings.cs
- RSAOAEPKeyExchangeDeformatter.cs
- ImageBrush.cs
- SecUtil.cs
- XsdCachingReader.cs
- ClientScriptManagerWrapper.cs
- XmlElementAttributes.cs
- EventSinkHelperWriter.cs
- AvTraceFormat.cs
- DataColumnPropertyDescriptor.cs
- ZipIOExtraFieldElement.cs
- DataGridRowsPresenter.cs
- DownloadProgressEventArgs.cs
- EntityDataReader.cs
- DBParameter.cs
- Expressions.cs
- SelectQueryOperator.cs
- MimeWriter.cs
- RenderData.cs
- TimeSpanStorage.cs
- SqlFileStream.cs
- KeyedCollection.cs
- MapPathBasedVirtualPathProvider.cs
- DataGridViewColumnEventArgs.cs
- StatusBarPanelClickEvent.cs
- SecureConversationVersion.cs
- TextServicesDisplayAttribute.cs
- SelectionEditingBehavior.cs
- NavigationPropertySingletonExpression.cs