Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / ConditionCollection.cs / 1305600 / 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
- LicenseContext.cs
- GZipStream.cs
- Control.cs
- ZipIOExtraFieldPaddingElement.cs
- HitTestFilterBehavior.cs
- X509CertificateChain.cs
- Vector3DCollectionConverter.cs
- JapaneseCalendar.cs
- HitTestWithPointDrawingContextWalker.cs
- SmtpReplyReader.cs
- MethodMessage.cs
- DebuggerAttributes.cs
- SharedPersonalizationStateInfo.cs
- SchemaNames.cs
- PlaceHolder.cs
- activationcontext.cs
- TableLayoutStyleCollection.cs
- ContextMenuStrip.cs
- ProgressBarAutomationPeer.cs
- MouseEvent.cs
- Emitter.cs
- TabPage.cs
- DispatchChannelSink.cs
- WorkflowInstance.cs
- ClientTarget.cs
- StrongNamePublicKeyBlob.cs
- DataControlFieldCollection.cs
- ComboBox.cs
- SqlNode.cs
- InputScope.cs
- Int64AnimationUsingKeyFrames.cs
- NavigationEventArgs.cs
- TreeNodeBindingDepthConverter.cs
- IPEndPointCollection.cs
- DocComment.cs
- COM2PropertyDescriptor.cs
- PackUriHelper.cs
- DrawingContext.cs
- ClientUrlResolverWrapper.cs
- DependencyObjectProvider.cs
- EventLog.cs
- BindingWorker.cs
- DataGridHelper.cs
- Wow64ConfigurationLoader.cs
- DBBindings.cs
- UnionQueryOperator.cs
- BaseProcessor.cs
- RewritingProcessor.cs
- ValueConversionAttribute.cs
- PerfService.cs
- FusionWrap.cs
- ListBox.cs
- Vector3DAnimationUsingKeyFrames.cs
- TextBox.cs
- rsa.cs
- CryptoKeySecurity.cs
- TlsSspiNegotiation.cs
- StrictAndMessageFilter.cs
- CompilerLocalReference.cs
- _CommandStream.cs
- TargetControlTypeAttribute.cs
- TemplateControlParser.cs
- TypedElement.cs
- SystemColors.cs
- OrderByBuilder.cs
- LogicalTreeHelper.cs
- MouseWheelEventArgs.cs
- EmptyEnumerator.cs
- AnyAllSearchOperator.cs
- FixedSOMPage.cs
- HttpListenerRequestUriBuilder.cs
- DataGrid.cs
- ExpandoObject.cs
- GraphicsPathIterator.cs
- InfoCardXmlSerializer.cs
- GridEntry.cs
- RelationshipEnd.cs
- BitmapEffectInput.cs
- EdmFunctionAttribute.cs
- SchemaObjectWriter.cs
- DocumentSchemaValidator.cs
- StringResourceManager.cs
- PowerStatus.cs
- AxImporter.cs
- GuidelineCollection.cs
- IdentifierCollection.cs
- DistinctQueryOperator.cs
- IUnknownConstantAttribute.cs
- ButtonBaseAdapter.cs
- StateWorkerRequest.cs
- CodeGenerator.cs
- ExcCanonicalXml.cs
- SqlWriter.cs
- BooleanAnimationBase.cs
- XmlTextAttribute.cs
- SerializableAttribute.cs
- SmtpFailedRecipientException.cs
- Vector3DKeyFrameCollection.cs
- RuntimeEnvironment.cs
- DateTimeValueSerializer.cs