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; // Collection
using 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
using 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
- TriggerBase.cs
- HWStack.cs
- DataGridViewHitTestInfo.cs
- EventData.cs
- DBSqlParserColumnCollection.cs
- DataGridColumnHeaderAutomationPeer.cs
- ErrorWebPart.cs
- CallSiteBinder.cs
- LogRestartAreaEnumerator.cs
- UnmanagedMarshal.cs
- BigIntegerStorage.cs
- FocusTracker.cs
- Control.cs
- BinaryMethodMessage.cs
- InvalidPrinterException.cs
- MD5.cs
- BindingValueChangedEventArgs.cs
- FillBehavior.cs
- CommandHelpers.cs
- TableRowsCollectionEditor.cs
- PrimitiveType.cs
- MenuItemBinding.cs
- SplitterCancelEvent.cs
- ExtendedPropertyDescriptor.cs
- MemoryFailPoint.cs
- MenuAdapter.cs
- DispatcherSynchronizationContext.cs
- JsonStringDataContract.cs
- UIElementAutomationPeer.cs
- WebSysDefaultValueAttribute.cs
- SqlLiftWhereClauses.cs
- GeneralTransform2DTo3D.cs
- RowCache.cs
- _LoggingObject.cs
- Model3D.cs
- ImageClickEventArgs.cs
- TlsSspiNegotiation.cs
- smtppermission.cs
- clipboard.cs
- SurrogateEncoder.cs
- QueryOptionExpression.cs
- CheckBoxList.cs
- DataListCommandEventArgs.cs
- regiisutil.cs
- DrawingBrush.cs
- EntityDataSourceReferenceGroup.cs
- SystemIcons.cs
- DbConnectionFactory.cs
- ProcessInfo.cs
- SizeAnimationClockResource.cs
- CompilerInfo.cs
- TableLayoutStyle.cs
- NeutralResourcesLanguageAttribute.cs
- CutCopyPasteHelper.cs
- Vector3D.cs
- QueryCacheEntry.cs
- RoutedEventConverter.cs
- BounceEase.cs
- CalendarAutomationPeer.cs
- SynchronousChannelMergeEnumerator.cs
- WsdlContractConversionContext.cs
- DesignerView.cs
- RtfToXamlReader.cs
- SystemDiagnosticsSection.cs
- SqlBuffer.cs
- DataGridViewRowStateChangedEventArgs.cs
- SafeArrayTypeMismatchException.cs
- WebZone.cs
- ChangesetResponse.cs
- JavaScriptSerializer.cs
- OrthographicCamera.cs
- SafeNativeMemoryHandle.cs
- KerberosReceiverSecurityToken.cs
- ProcessHost.cs
- KeyboardDevice.cs
- DataGridViewCellParsingEventArgs.cs
- DataFormats.cs
- TextAction.cs
- MailDefinitionBodyFileNameEditor.cs
- OdbcDataAdapter.cs
- UndirectedGraph.cs
- InvokeFunc.cs
- WeakEventTable.cs
- LoginView.cs
- PreProcessInputEventArgs.cs
- DataRelationPropertyDescriptor.cs
- AnnotationResource.cs
- IISUnsafeMethods.cs
- BatchParser.cs
- StringWriter.cs
- Calendar.cs
- ListItemCollection.cs
- NestedContainer.cs
- OrderByQueryOptionExpression.cs
- DataSourceCacheDurationConverter.cs
- FontStretch.cs
- DesignerForm.cs
- HealthMonitoringSection.cs
- ActivatedMessageQueue.cs
- LeftCellWrapper.cs